You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { useWindowDimensions } from 'react-native';
/**
* Represents the device orientation.
*/
export interface IterableDeviceOrientation {
/** The height of the device screen */
height: number;
/** The width of the device screen */
width: number;
/** Indicates if the device is in portrait mode */
isPortrait: boolean;
}
/* eslint-disable tsdoc/syntax */
/**
* Custom hook to get the current device orientation.
*
* This hook returns the height, width, and a boolean indicating if the device is in portrait mode.
* It listens to changes in the window dimensions and updates the orientation accordingly.
*
* @returns {IterableDeviceOrientation} An object containing the height, width, and a boolean `isPortrait` indicating if the device is in portrait mode.