|
|
@@ -2,6 +2,7 @@ import { View, Text, ScrollView, FlatList, Pressable, ActivityIndicator, Image,
|
|
|
import NormalButton from '../global/normal_button';
|
|
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
|
import { router } from 'expo-router';
|
|
|
+import { useColorScheme } from 'nativewind';
|
|
|
import RecentlyBookedScrollView from '../global/recentlyBookedScrollView';
|
|
|
import {
|
|
|
BellIconSvg,
|
|
|
@@ -21,10 +22,15 @@ interface HomePageProps {}
|
|
|
|
|
|
const HomePage: React.FC<HomePageProps> = () => {
|
|
|
const now = new Date();
|
|
|
-
|
|
|
const { user } = useContext(AuthContext);
|
|
|
const { userID, currentPrice, setUserID, setCurrentPrice } = useUserInfoStore();
|
|
|
-
|
|
|
+ const { colorScheme, toggleColorScheme } = useColorScheme();
|
|
|
+ useEffect(() => {
|
|
|
+ // Set to light mode on component mount
|
|
|
+ if (colorScheme === 'dark') {
|
|
|
+ toggleColorScheme();
|
|
|
+ }
|
|
|
+ }, []);
|
|
|
// Effect for fetching user ID
|
|
|
useEffect(() => {
|
|
|
const fetchID = async () => {
|
|
|
@@ -85,7 +91,7 @@ const HomePage: React.FC<HomePageProps> = () => {
|
|
|
}, []);
|
|
|
|
|
|
return (
|
|
|
- <SafeAreaView edges={['top', 'left', 'right']} className="flex-1 bg-white dark:bg-black">
|
|
|
+ <SafeAreaView edges={['top', 'left', 'right']} className="flex-1 bg-white">
|
|
|
{/* Add Modal component */}
|
|
|
{mainPromotionImage && (
|
|
|
<Modal
|