From 9bbc352758df8fe903c9eff9e82d3ebdf837ca0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Qu=E1=BB=91c=20Kh=C3=A1nh?= Date: Mon, 10 Jun 2024 03:04:39 +0700 Subject: [PATCH] feat(mobile): app layout --- apps/mobile/app/(app)/(tabs)/_layout.tsx | 53 +++++++++++++++-------- apps/mobile/app/(app)/(tabs)/budgets.tsx | 11 +++++ apps/mobile/app/(app)/(tabs)/explore.tsx | 37 ---------------- apps/mobile/app/(app)/(tabs)/index.tsx | 16 ++++++- apps/mobile/app/(app)/(tabs)/scanner.tsx | 11 +++++ apps/mobile/app/(app)/(tabs)/settings.tsx | 53 +++++++++++++++++++++++ apps/mobile/app/(app)/_layout.tsx | 11 ++++- apps/mobile/app/(app)/new-record.tsx | 5 +++ apps/mobile/components/Badge.tsx | 8 ++-- apps/mobile/components/Button.tsx | 4 +- apps/mobile/components/IconButton.tsx | 19 +++++--- apps/mobile/components/Input.tsx | 7 +++ apps/mobile/components/common/toolbar.tsx | 20 +++++++++ apps/mobile/components/home/header.tsx | 36 +++++++++++++++ apps/mobile/lib/theme.ts | 2 + 15 files changed, 223 insertions(+), 70 deletions(-) create mode 100644 apps/mobile/app/(app)/(tabs)/budgets.tsx delete mode 100644 apps/mobile/app/(app)/(tabs)/explore.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/scanner.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/settings.tsx create mode 100644 apps/mobile/app/(app)/new-record.tsx create mode 100644 apps/mobile/components/common/toolbar.tsx create mode 100644 apps/mobile/components/home/header.tsx diff --git a/apps/mobile/app/(app)/(tabs)/_layout.tsx b/apps/mobile/app/(app)/(tabs)/_layout.tsx index db31e18c..2f79449b 100644 --- a/apps/mobile/app/(app)/(tabs)/_layout.tsx +++ b/apps/mobile/app/(app)/(tabs)/_layout.tsx @@ -1,37 +1,56 @@ +import { useColorScheme } from '@/hooks/useColorScheme' +import { theme } from '@/lib/theme' import { Tabs } from 'expo-router' - -import { TabBarIcon } from '@/components/navigation/TabBarIcon' +import { CogIcon, LandPlotIcon, ScanTextIcon, WalletIcon } from 'lucide-react-native' export default function TabLayout() { + const colorScheme = useColorScheme() return ( , + }} + /> + , + }} + /> + ( - - ), + tabBarIcon: ({ color }) => , }} /> ( - - ), + tabBarIcon: ({ color }) => , }} /> diff --git a/apps/mobile/app/(app)/(tabs)/budgets.tsx b/apps/mobile/app/(app)/(tabs)/budgets.tsx new file mode 100644 index 00000000..3d154f0a --- /dev/null +++ b/apps/mobile/app/(app)/(tabs)/budgets.tsx @@ -0,0 +1,11 @@ +import { Toolbar } from '@/components/common/toolbar' +import { Text, View } from 'react-native' + +export default function BudgetsScreen() { + return ( + + Budgets Screen + + + ) +} diff --git a/apps/mobile/app/(app)/(tabs)/explore.tsx b/apps/mobile/app/(app)/(tabs)/explore.tsx deleted file mode 100644 index 79e9d449..00000000 --- a/apps/mobile/app/(app)/(tabs)/explore.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { Avatar, AvatarFallback, AvatarImage } from '@/components/Avatar' -import { Button } from '@/components/Button' -import { useMeQuery } from '@/queries/auth' -import { useAuth } from '@clerk/clerk-expo' -import { ScrollView, Text, View } from 'react-native' - -export default function TabTwoScreen() { - const { signOut } = useAuth() - const { data } = useMeQuery() - - return ( - - - - - CG - - - - SS - - - - {data?.email ? `Logged as ${data.email}` : 'loading...'} - -