Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit d845d25

Browse files
committed
feat: add screens and layout for managing gifts and recipients
1 parent bd13632 commit d845d25

14 files changed

+192
-28
lines changed

src/app/(gifts)/_layout.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Stack } from 'expo-router';
2+
3+
const Layout = () => {
4+
return (
5+
<Stack>
6+
<Stack.Screen name="index" options={{ headerShown: false }} />
7+
<Stack.Screen name="edit-gift" options={{ title: 'Edit Gift' }} />
8+
<Stack.Screen name="add-gift" options={{ title: 'Add Gift' }} />
9+
<Stack.Screen name="detail-gift" options={{ title: 'Gift Detail' }} />
10+
</Stack>
11+
);
12+
};
13+
14+
export default Layout;

src/app/(gifts)/add-gift.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Text, View } from 'react-native';
2+
3+
const AddGiftScreen = () => {
4+
return (
5+
<View>
6+
<Text>Add Recipient Screen</Text>
7+
</View>
8+
);
9+
};
10+
11+
export default AddGiftScreen;

src/app/(gifts)/detail-gift.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Text, View } from 'react-native';
2+
3+
const DetailGiftScreen = () => {
4+
return (
5+
<View>
6+
<Text>Edit Recipient Screen</Text>
7+
</View>
8+
);
9+
};
10+
11+
export default DetailGiftScreen;

src/app/(gifts)/edit-gift.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Text, View } from 'react-native';
2+
3+
const EditGiftScreen = () => {
4+
return (
5+
<View>
6+
<Text>Edit Recipient Screen</Text>
7+
</View>
8+
);
9+
};
10+
11+
export default EditGiftScreen;

src/app/(gifts)/index.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Link } from 'expo-router';
2+
import { StyleSheet, Text } from 'react-native';
3+
import { SafeAreaView } from 'react-native-safe-area-context';
4+
5+
const HomeScreen = () => {
6+
return (
7+
<SafeAreaView style={styles.container}>
8+
<Text>Home Screen</Text>
9+
<Link href="/(gifts)/edit-gift" push>
10+
Edit Gift
11+
</Link>
12+
</SafeAreaView>
13+
);
14+
};
15+
16+
const styles = StyleSheet.create({
17+
container: {
18+
flex: 1,
19+
backgroundColor: '#FFFFFF',
20+
},
21+
});
22+
23+
export default HomeScreen;

src/app/_layout.tsx

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,61 @@
11
import AntDesign from '@expo/vector-icons/AntDesign';
2+
import Ionicons from '@expo/vector-icons/Ionicons';
23
import { Tabs } from 'expo-router';
34
import { StatusBar } from 'expo-status-bar';
45
import React from 'react';
6+
import { View } from 'react-native';
57

68
import BottomTabBar from '@/components/tabbar/BottomTabBar';
79

810
const RootLayout = () => {
911
return (
10-
<React.Fragment>
12+
<View style={styles.container}>
1113
<StatusBar style="auto" />
1214
<Tabs
1315
tabBar={(props) => <BottomTabBar {...props} />}
1416
screenOptions={{
15-
// headerShown: false,
16-
// tabBarStyle: { display: 'none' },
17+
headerShown: false,
1718
tabBarActiveTintColor: '#4B6BFB',
1819
tabBarInactiveTintColor: '#666666',
1920
}}
2021
>
2122
<Tabs.Screen
22-
name="index"
23+
name="recipients"
24+
options={{
25+
title: 'Recipients',
26+
tabBarIcon: ({ color, size }) => (
27+
<Ionicons name="people-outline" size={size} color={color} />
28+
),
29+
}}
30+
/>
31+
<Tabs.Screen
32+
name="(gifts)"
2333
options={{
2434
title: 'Home',
2535
tabBarIcon: ({ color, size }) => (
2636
<AntDesign name="home" size={size} color={color} />
2737
),
2838
}}
2939
/>
30-
<Tabs.Screen name="second" options={{ title: 'Settings' }} />
40+
<Tabs.Screen
41+
name="settings"
42+
options={{
43+
title: 'Settings',
44+
tabBarIcon: ({ color, size }) => (
45+
<AntDesign name="setting" size={size} color={color} />
46+
),
47+
}}
48+
/>
3149
</Tabs>
32-
</React.Fragment>
50+
</View>
3351
);
3452
};
3553

54+
const styles = {
55+
container: {
56+
flex: 1,
57+
backgroundColor: '#FFFFFF',
58+
},
59+
};
60+
3661
export default RootLayout;

src/app/index.tsx

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/app/recipients/_layout.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { Stack } from 'expo-router';
2+
3+
const Layout = () => {
4+
return (
5+
<Stack>
6+
<Stack.Screen name="index" options={{ headerShown: false }} />
7+
<Stack.Screen
8+
name="edit-recipient"
9+
options={{ title: 'Edit Recipient' }}
10+
/>
11+
<Stack.Screen name="add-recipient" options={{ title: 'Add Recipient' }} />
12+
<Stack.Screen
13+
name="detail-recipient"
14+
options={{ title: 'Recipient Detail' }}
15+
/>
16+
</Stack>
17+
);
18+
};
19+
20+
export default Layout;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Text, View } from 'react-native';
2+
3+
const AddRecipientScreen = () => {
4+
return (
5+
<View>
6+
<Text>Add Recipient Screen</Text>
7+
</View>
8+
);
9+
};
10+
11+
export default AddRecipientScreen;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Text, View } from 'react-native';
2+
3+
const DetailRecipientScreen = () => {
4+
return (
5+
<View>
6+
<Text>Detail Recipient Screen</Text>
7+
</View>
8+
);
9+
};
10+
11+
export default DetailRecipientScreen;

0 commit comments

Comments
 (0)