import React, { useEffect } from 'react';
import { View, Text } from 'react-native';
import * as ScreenOrientation from 'expo-screen-orientation';

const TabletChoresPage = () => {
  // Function to lock the screen orientation to landscape
  const lockScreenOrientation = async () => {
    await ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.LANDSCAPE_RIGHT);
  };

  useEffect(() => {
    lockScreenOrientation();  // Lock orientation when the component mounts

    return () => {
      // Optional: Unlock to default when the component unmounts
      ScreenOrientation.unlockAsync();
    };
  }, []);

  return (
    <View>
      <Text>TabletChoresPage</Text>
    </View>
  );
};

export default TabletChoresPage;
