Skip to content

Commit eda710c

Browse files
committed
feat(ui): basic styling done tab bar
1 parent 94b71d6 commit eda710c

5 files changed

Lines changed: 5882 additions & 2079 deletions

File tree

frontend/app/(tabs)/_layout.tsx

Lines changed: 50 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,58 @@
11
import { Tabs } from 'expo-router';
2-
import {Home,Search,Ticket,User } from 'lucide-react-native'
2+
import { Home, Search, Ticket, User } from 'lucide-react-native';
33

44
export default function TabLayout() {
55
return (
6-
<Tabs
7-
screenOptions={{
8-
headerShown: false,
9-
tabBarShowLabel:false,
10-
tabBarStyle:{
11-
height:60,
12-
paddingTop:6,
13-
paddingBottom:6,
14-
},
15-
tabBarActiveTintColor:'#22c55e',
16-
tabBarInactiveTintColor:'#9ca3af'
17-
}}>
18-
<Tabs.Screen name="home/index" options={{title: 'Home', tabBarIcon:({color,size})=>(<Home color={color} size={size} strokeWidth={1}/>)
19-
}} />
20-
<Tabs.Screen name="search/index" options={{ title: 'Search',tabBarIcon:({color,size})=>(<Search color={color} size={size} strokeWidth={1} />) }} />
21-
<Tabs.Screen name="events/index" options={{ title: 'Events',tabBarIcon:({color,size})=>(<Ticket color={color} size={size} strokeWidth={1}/>) }} />
6+
<Tabs
7+
screenOptions={{
8+
headerShown: false,
9+
tabBarShowLabel: false,
10+
tabBarStyle: {
11+
height: 60,
12+
paddingTop: 6,
13+
paddingBottom: 6,
14+
},
15+
tabBarActiveTintColor: '#22c55e',
16+
tabBarInactiveTintColor: '#9ca3af',
17+
}}
18+
>
19+
<Tabs.Screen
20+
name="home/index"
21+
options={{
22+
title: 'Home',
23+
tabBarIcon: ({ color, size }) => (
24+
<Home color={color} size={size} strokeWidth={1} />
25+
),
26+
}}
27+
/>
28+
<Tabs.Screen
29+
name="search/index"
30+
options={{
31+
title: 'Search',
32+
tabBarIcon: ({ color, size }) => (
33+
<Search color={color} size={size} strokeWidth={1} />
34+
),
35+
}}
36+
/>
37+
<Tabs.Screen
38+
name="events/index"
39+
options={{
40+
title: 'Events',
41+
tabBarIcon: ({ color, size }) => (
42+
<Ticket color={color} size={size} strokeWidth={1} />
43+
),
44+
}}
45+
/>
2246
<Tabs.Screen name="events/[id]" options={{ href: null }} />
23-
<Tabs.Screen name="profile/index" options={{ title: 'Profile', tabBarIcon:({color,size})=>(<User color={color} size={size} strokeWidth={1}/>) }} />
47+
<Tabs.Screen
48+
name="profile/index"
49+
options={{
50+
title: 'Profile',
51+
tabBarIcon: ({ color, size }) => (
52+
<User color={color} size={size} strokeWidth={1} />
53+
),
54+
}}
55+
/>
2456
</Tabs>
2557
);
2658
}

frontend/screens/auth/PhoneScreen.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ export default function PhoneScreen() {
2323
params: { phone: fullPhoneNumber },
2424
});
2525
}
26-
}catch(err:any){
27-
const data = err?.response?.data
28-
if(data.next=="login"){
29-
router.push("/(auth)/login")
26+
} catch (err: any) {
27+
const data = err?.response?.data;
28+
if (data.next == 'login') {
29+
router.push('/(auth)/login');
3030
}
31-
}
32-
finally {
31+
} finally {
3332
setLoading(false);
3433
}
3534
};

frontend/screens/auth/RegisterScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export default function RegisterScreen() {
8787

8888
if (res?.success) {
8989
router.replace('/(tabs)/home');
90-
storeTokens(res.accesstoken,res.refreshtoken)
90+
storeTokens(res.accesstoken, res.refreshtoken);
9191
} else {
9292
Alert.alert('Registration failed', res?.message || 'Try again');
9393
}

frontend/screens/auth/loginScreen.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ export default function LoginScreen() {
2020
async function handleLogin() {
2121
const res = await loginUser({ phoneNumber, password });
2222
console.log(res);
23-
2423

2524
if (res?.success) {
2625
router.replace('/(tabs)/home');
27-
storeTokens(res.accesstoken,res.refreshtoken)
28-
26+
storeTokens(res.accesstoken, res.refreshtoken);
2927
}
3028
}
3129

0 commit comments

Comments
 (0)