added tablet view

This commit is contained in:
ivic00
2024-10-24 21:34:12 +02:00
parent ae01b9daaf
commit 36ebfc38aa
13 changed files with 213 additions and 31 deletions
+11 -4
View File
@@ -6,7 +6,7 @@ import {
DrawerItem,
DrawerItemList,
} from "@react-navigation/drawer";
import { Button, View, Text, ButtonSize } from "react-native-ui-lib";
import { Button, View, Text, ButtonSize, Constants } from "react-native-ui-lib";
import { StyleSheet } from "react-native";
import Feather from "@expo/vector-icons/Feather";
import DrawerButton from "@/components/shared/DrawerButton";
@@ -23,6 +23,7 @@ import NavToDosIcon from "@/assets/svgs/NavToDosIcon";
import NavBrainDumpIcon from "@/assets/svgs/NavBrainDumpIcon";
import NavCalendarIcon from "@/assets/svgs/NavCalendarIcon";
import NavSettingsIcon from "@/assets/svgs/NavSettingsIcon";
import ViewSwitch from "@/components/pages/(tablet_pages)/ViewSwitch";
export default function TabLayout() {
const { mutateAsync: signOut } = useSignOut();
@@ -33,6 +34,12 @@ export default function TabLayout() {
detachInactiveScreens
screenOptions={{
headerShown: true,
headerRight: () =>
Constants.isTablet ? (
<ViewSwitch />
) : (
<></>
),
drawerStyle: {
width: "90%",
backgroundColor: "#f9f8f7",
@@ -203,7 +210,7 @@ const styles = StyleSheet.create({
label: { fontFamily: "Poppins_400Medium", fontSize: 15 },
title: {
fontSize: 26.13,
fontFamily: 'Manrope_600SemiBold',
color: "#262627"
}
fontFamily: "Manrope_600SemiBold",
color: "#262627",
},
});
+3 -3
View File
@@ -1,8 +1,8 @@
import React from "react";
import CalendarPage from "@/components/pages/calendar/CalendarPage";
import { Constants } from "react-native-ui-lib";
import TabletCalendarPage from "@/components/pages/(tablet_pages)/calendar/TabletCalendarPage";
export default function Screen() {
return (
<CalendarPage/>
);
return <>{Constants.isTablet ? <TabletCalendarPage /> : <CalendarPage />}</>;
}
+3 -2
View File
@@ -1,3 +1,4 @@
import TabletChoresPage from "@/components/pages/(tablet_pages)/chores/TabletChoresPage";
import AddChore from "@/components/pages/todos/AddChore";
import ProgressCard from "@/components/pages/todos/ProgressCard";
import ToDoItem from "@/components/pages/todos/ToDoItem";
@@ -8,12 +9,12 @@ import { useAuthContext } from "@/contexts/AuthContext";
import { ToDosContextProvider, useToDosContext } from "@/contexts/ToDosContext";
import { AntDesign } from "@expo/vector-icons";
import { ScrollView } from "react-native-gesture-handler";
import { Button, ButtonSize, View, Text } from "react-native-ui-lib";
import { Button, ButtonSize, View, Text, Constants } from "react-native-ui-lib";
export default function Screen() {
return (
<ToDosContextProvider>
<ToDosPage />
{Constants.isTablet ? <TabletChoresPage /> : <ToDosPage />}
</ToDosContextProvider>
);
}