Skip to content

Commit b5b69bd

Browse files
committed
init
1 parent 37046c7 commit b5b69bd

37 files changed

+480
-677
lines changed

app.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
},
1414
"android": {
1515
"adaptiveIcon": {
16-
"foregroundImage": "./assets/images/adaptive-icon.png",
1716
"backgroundColor": "#ffffff"
1817
}
1918
},
@@ -27,15 +26,15 @@
2726
[
2827
"expo-splash-screen",
2928
{
30-
"image": "./assets/images/splash-icon.png",
3129
"imageWidth": 200,
3230
"resizeMode": "contain",
3331
"backgroundColor": "#ffffff"
3432
}
35-
]
33+
],
34+
"expo-font"
3635
],
3736
"experiments": {
3837
"typedRoutes": true
3938
}
4039
}
41-
}
40+
}

app/(tabs)/_layout.tsx

Lines changed: 52 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,56 @@
1-
import { Tabs } from 'expo-router';
2-
import React from 'react';
3-
import { Platform } from 'react-native';
4-
5-
import { HapticTab } from '@/components/HapticTab';
6-
import { IconSymbol } from '@/components/ui/IconSymbol';
7-
import TabBarBackground from '@/components/ui/TabBarBackground';
8-
import { Colors } from '@/constants/Colors';
9-
import { useColorScheme } from '@/hooks/useColorScheme';
1+
import GameBoardIcon from "@/components/ui/icons/gameBoard";
2+
import NewsIcon from "@/components/ui/icons/news";
3+
import RankIcon from "@/components/ui/icons/rank";
4+
import RegisterIcon from "@/components/ui/icons/register";
5+
import { Tabs, usePathname } from "expo-router";
106

117
export default function TabLayout() {
12-
const colorScheme = useColorScheme();
8+
const path = usePathname();
139

14-
return (
15-
<Tabs
16-
screenOptions={{
17-
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
18-
headerShown: false,
19-
tabBarButton: HapticTab,
20-
tabBarBackground: TabBarBackground,
21-
tabBarStyle: Platform.select({
22-
ios: {
23-
// Use a transparent background on iOS to show the blur effect
24-
position: 'absolute',
25-
},
26-
default: {},
27-
}),
28-
}}>
29-
<Tabs.Screen
30-
name="index"
31-
options={{
32-
title: 'Home',
33-
tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
34-
}}
35-
/>
36-
<Tabs.Screen
37-
name="explore"
38-
options={{
39-
title: 'Explore',
40-
tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
41-
}}
42-
/>
43-
</Tabs>
44-
);
10+
if (path === "/chat") {
11+
return null;
12+
}
13+
return (
14+
<Tabs
15+
screenOptions={{
16+
headerShown: false,
17+
tabBarLabelStyle: {
18+
fontFamily: "Rubik_400Regular",
19+
fontSize: 14,
20+
},
21+
tabBarStyle: {
22+
backgroundColor: "#1F1B1B",
23+
},
24+
}}
25+
>
26+
<Tabs.Screen
27+
name="register"
28+
options={{
29+
title: "Register",
30+
tabBarIcon: RegisterIcon,
31+
}}
32+
/>
33+
<Tabs.Screen
34+
name="index"
35+
options={{
36+
title: "Game Board",
37+
tabBarIcon: GameBoardIcon,
38+
}}
39+
/>
40+
<Tabs.Screen
41+
name="rank"
42+
options={{
43+
title: "Rank",
44+
tabBarIcon: RankIcon,
45+
}}
46+
/>
47+
<Tabs.Screen
48+
name="news"
49+
options={{
50+
title: "News",
51+
tabBarIcon: NewsIcon,
52+
}}
53+
/>
54+
</Tabs>
55+
);
4556
}

app/(tabs)/explore.tsx

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

app/(tabs)/index.tsx

Lines changed: 11 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,12 @@
1-
import { Image, StyleSheet, Platform } from 'react-native';
1+
import GradientBackground from "@/components/ui/chatButton";
2+
import { Text, View } from "react-native";
23

3-
import { HelloWave } from '@/components/HelloWave';
4-
import ParallaxScrollView from '@/components/ParallaxScrollView';
5-
import { ThemedText } from '@/components/ThemedText';
6-
import { ThemedView } from '@/components/ThemedView';
7-
8-
export default function HomeScreen() {
9-
return (
10-
<ParallaxScrollView
11-
headerBackgroundColor={{ light: '#A1CEDC', dark: '#1D3D47' }}
12-
headerImage={
13-
<Image
14-
source={require('@/assets/images/partial-react-logo.png')}
15-
style={styles.reactLogo}
16-
/>
17-
}>
18-
<ThemedView style={styles.titleContainer}>
19-
<ThemedText type="title">Welcome!</ThemedText>
20-
<HelloWave />
21-
</ThemedView>
22-
<ThemedView style={styles.stepContainer}>
23-
<ThemedText type="subtitle">Step 1: Try it</ThemedText>
24-
<ThemedText>
25-
Edit <ThemedText type="defaultSemiBold">app/(tabs)/index.tsx</ThemedText> to see changes.
26-
Press{' '}
27-
<ThemedText type="defaultSemiBold">
28-
{Platform.select({
29-
ios: 'cmd + d',
30-
android: 'cmd + m',
31-
web: 'F12'
32-
})}
33-
</ThemedText>{' '}
34-
to open developer tools.
35-
</ThemedText>
36-
</ThemedView>
37-
<ThemedView style={styles.stepContainer}>
38-
<ThemedText type="subtitle">Step 2: Explore</ThemedText>
39-
<ThemedText>
40-
Tap the Explore tab to learn more about what's included in this starter app.
41-
</ThemedText>
42-
</ThemedView>
43-
<ThemedView style={styles.stepContainer}>
44-
<ThemedText type="subtitle">Step 3: Get a fresh start</ThemedText>
45-
<ThemedText>
46-
When you're ready, run{' '}
47-
<ThemedText type="defaultSemiBold">npm run reset-project</ThemedText> to get a fresh{' '}
48-
<ThemedText type="defaultSemiBold">app</ThemedText> directory. This will move the current{' '}
49-
<ThemedText type="defaultSemiBold">app</ThemedText> to{' '}
50-
<ThemedText type="defaultSemiBold">app-example</ThemedText>.
51-
</ThemedText>
52-
</ThemedView>
53-
</ParallaxScrollView>
54-
);
55-
}
56-
57-
const styles = StyleSheet.create({
58-
titleContainer: {
59-
flexDirection: 'row',
60-
alignItems: 'center',
61-
gap: 8,
62-
},
63-
stepContainer: {
64-
gap: 8,
65-
marginBottom: 8,
66-
},
67-
reactLogo: {
68-
height: 178,
69-
width: 290,
70-
bottom: 0,
71-
left: 0,
72-
position: 'absolute',
73-
},
74-
});
4+
const HomeScreen = () => {
5+
return (
6+
<View>
7+
<Text>Home Screen</Text>
8+
<GradientBackground />
9+
</View>
10+
);
11+
};
12+
export default HomeScreen;

app/(tabs)/news.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Text, View } from "react-native";
2+
3+
const NewsScreen = () => {
4+
return (
5+
<View
6+
style={{ flex: 1, justifyContent: "center", alignItems: "center" }}
7+
>
8+
<Text>Not implemented yet!</Text>
9+
</View>
10+
);
11+
};
12+
13+
export default NewsScreen;

app/(tabs)/rank.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import DynamicSvgLoader from "@/components/ui/dyanmicSvgLoader";
2+
import { flag } from "@nexisltd/country";
3+
import { Text, View } from "react-native";
4+
5+
const RankScreen = () => {
6+
return (
7+
<View
8+
style={{ flex: 1, justifyContent: "center", alignItems: "center" }}
9+
>
10+
<Text>Not implemented yet!</Text>
11+
<View style={{ width: 20, height: 20 }}>
12+
<DynamicSvgLoader link={flag("Brazil")?.flag!} />
13+
</View>
14+
</View>
15+
);
16+
};
17+
18+
export default RankScreen;

app/(tabs)/register.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Text, View } from "react-native";
2+
3+
const RegisterScreen = () => {
4+
return (
5+
<View
6+
style={{ flex: 1, justifyContent: "center", alignItems: "center" }}
7+
>
8+
<Text>Not implemented yet!</Text>
9+
</View>
10+
);
11+
};
12+
13+
export default RegisterScreen;

0 commit comments

Comments
 (0)