Files
otunes/apps/mobile/hooks/use-tablet-layout.ts
T

8 lines
282 B
TypeScript

import { Platform, useWindowDimensions } from "react-native"
/** Use the phone layout in compact iPad windows, including Split View. */
export function useTabletLayout() {
const { width } = useWindowDimensions()
return Platform.OS === "ios" && Platform.isPad && width >= 600
}