import { useWindowDimensions } from "react-native";

type Return = "landscape" | "portrait";

export const useOrientation = (): Return => {
  const { width, height } = useWindowDimensions();
  const isLandscape = width > height;

  return isLandscape ? "landscape" : "portrait";
};
