reasourcing home
This commit is contained in:
55
app/(application)/(tabs)/_layout.tsx
Normal file
55
app/(application)/(tabs)/_layout.tsx
Normal file
@@ -0,0 +1,55 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
//app/(application)/(tabs)/_layout.tsx
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { Entypo, Ionicons } from "@expo/vector-icons";
|
||||
import { router, Tabs } from "expo-router";
|
||||
|
||||
export default function TabsLayout() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tabs
|
||||
screenOptions={{
|
||||
headerTitleAlign: "center",
|
||||
tabBarStyle: {
|
||||
backgroundColor: MainColor.darkblue,
|
||||
},
|
||||
tabBarActiveTintColor: MainColor.white,
|
||||
}}
|
||||
>
|
||||
<Tabs.Screen name="index" options={{ href: null }} />
|
||||
<Tabs.Screen
|
||||
name="forum"
|
||||
options={{
|
||||
title: "Forum",
|
||||
tabBarIcon: () => (
|
||||
<Entypo name="chat" size={20} color={MainColor.white} />
|
||||
),
|
||||
headerLeft: () => (
|
||||
<Ionicons name="arrow-back" onPress={() => {router.back()}} size={20} color={MainColor.white} />
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
<Tabs.Screen
|
||||
name="katalog"
|
||||
options={{
|
||||
title: "Katalog",
|
||||
tabBarIcon: () => (
|
||||
<Entypo name="book" size={20} color={MainColor.white} />
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="maps"
|
||||
options={{
|
||||
title: "Maps",
|
||||
tabBarIcon: () => (
|
||||
<Entypo name="map" size={20} color={MainColor.white} />
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</Tabs>
|
||||
</>
|
||||
);
|
||||
}
|
||||
10
app/(application)/(tabs)/forum/_layout.tsx
Normal file
10
app/(application)/(tabs)/forum/_layout.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
//app/(application)/(tabs)/forum/_layout.tsx
|
||||
import { Stack } from "expo-router";
|
||||
|
||||
export default function ForumLayout() {
|
||||
return<>
|
||||
<Stack>
|
||||
<Stack.Screen name="index" options={{ headerShown: false, }} />
|
||||
</Stack>
|
||||
</>
|
||||
}
|
||||
9
app/(application)/(tabs)/forum/index.tsx
Normal file
9
app/(application)/(tabs)/forum/index.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Text, View } from "react-native";
|
||||
|
||||
export default function Forum() {
|
||||
return (
|
||||
<View>
|
||||
<Text>Tabs Forum</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
22
app/(application)/(tabs)/index.tsx
Normal file
22
app/(application)/(tabs)/index.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import HomeView from "@/components/Home/HomeView";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { Stack, useNavigation, useRouter } from "expo-router";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export default function Tabs() {
|
||||
// const router = useRouter();
|
||||
// const navigation = useNavigation();
|
||||
// useEffect(() => {
|
||||
// navigation.setOptions({
|
||||
|
||||
// });
|
||||
// }, [navigation]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<HomeView />
|
||||
</>
|
||||
);
|
||||
}
|
||||
9
app/(application)/(tabs)/maps.tsx
Normal file
9
app/(application)/(tabs)/maps.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Text, View } from "react-native";
|
||||
|
||||
export default function Maps() {
|
||||
return (
|
||||
<View>
|
||||
<Text>Maps</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
@@ -1,28 +1,41 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||
import { Entypo } from "@expo/vector-icons";
|
||||
import { Tabs } from "expo-router";
|
||||
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { Stack } from "expo-router";
|
||||
|
||||
export default function ApplicationLayout() {
|
||||
return (
|
||||
<>
|
||||
<Tabs>
|
||||
<Tabs.Screen name="index" options={{ href: null }} />
|
||||
<Tabs.Screen
|
||||
name="home/index"
|
||||
<Stack
|
||||
screenOptions={{
|
||||
headerStyle: { backgroundColor: MainColor.darkblue },
|
||||
headerTitleStyle: { color: MainColor.yellow, fontWeight: "bold" },
|
||||
headerTitleAlign: "center",
|
||||
contentStyle: {
|
||||
borderBottomColor: AccentColor.blue,
|
||||
borderBottomWidth: 2,
|
||||
},
|
||||
headerLargeStyle: {
|
||||
backgroundColor: MainColor.darkblue,
|
||||
},
|
||||
headerShadowVisible: false,
|
||||
}}
|
||||
>
|
||||
<Stack.Screen
|
||||
name="(tabs)"
|
||||
options={{
|
||||
title: "Home",
|
||||
tabBarIcon: () => <Entypo name="home" size={24} color="black" />,
|
||||
headerShown: false,
|
||||
// title: "iii",
|
||||
// headerLeft: () => (
|
||||
// <Ionicons name="search" size={20} color={MainColor.white} />
|
||||
// ),
|
||||
// headerRight: () => (
|
||||
// <Ionicons name="notifications" size={20} color={MainColor.white} />
|
||||
// ),
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="katalog/index"
|
||||
options={{
|
||||
title: "Katalog",
|
||||
tabBarIcon: () => <Entypo name="book" size={24} color="black" />,
|
||||
}}
|
||||
/>
|
||||
</Tabs>
|
||||
{/* <Stack.Screen name="forum/index" options={{ title: "Forum", }} /> */}
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
9
app/(application)/home.tsx
Normal file
9
app/(application)/home.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import HomeView from "@/components/Home/HomeView";
|
||||
|
||||
export default function Application() {
|
||||
return (
|
||||
<>
|
||||
<HomeView />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import { Text, View } from "react-native";
|
||||
import { useEffect } from "react";
|
||||
import { useNavigation } from "expo-router";
|
||||
|
||||
export default function Home() {
|
||||
const navigation = useNavigation();
|
||||
|
||||
useEffect(() => {
|
||||
navigation.setOptions({
|
||||
headerShown: false,
|
||||
});
|
||||
}, [navigation]);
|
||||
|
||||
return (
|
||||
<View>
|
||||
<Text>Home</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { ImageBackground, ScrollView, Text, View } from "react-native";
|
||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||
import { globalStyles } from "@/constants/global-styles";
|
||||
import Spacing from "@/components/_ShareComponent/Spacing";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
|
||||
export default function Application() {
|
||||
|
||||
return (
|
||||
<ScrollView contentContainerStyle={{ flexGrow: 1 }}>
|
||||
<ImageBackground
|
||||
source={require("../../assets/images/main-background.png")}
|
||||
resizeMode="cover"
|
||||
style={globalStyles.imageBackground}
|
||||
>
|
||||
<View style={globalStyles.container}>
|
||||
{Array.from({ length: 20 }).map((_, index) => (
|
||||
<View key={index}>
|
||||
<Text style={globalStyles.authTitle}>Application {index}</Text>
|
||||
<Spacing height={30} />
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
</ImageBackground>
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
@@ -1,15 +1,52 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||
import { Feather, Ionicons, MaterialIcons } from "@expo/vector-icons";
|
||||
import { Stack } from "expo-router";
|
||||
import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
|
||||
import Icon from "react-native-vector-icons/FontAwesome";
|
||||
|
||||
export default function RootLayout() {
|
||||
return (
|
||||
<Stack>
|
||||
<Stack.Screen name="index" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="verification" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="register" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="(application)" options={{ headerShown: false }} />
|
||||
{/* <Stack.Screen name="(application)/home/index" options={{ title: "Home" }} />
|
||||
<Stack.Screen name="(application)/(katalog)/index" options={{ title: "Katalog" }} /> */}
|
||||
|
||||
</Stack>
|
||||
<SafeAreaProvider
|
||||
style={{
|
||||
backgroundColor: MainColor.darkblue,
|
||||
}}
|
||||
>
|
||||
<Stack
|
||||
screenOptions={{
|
||||
headerStyle: { backgroundColor: MainColor.darkblue },
|
||||
headerTitleStyle: { color: MainColor.yellow, fontWeight: "bold" },
|
||||
headerTitleAlign: "center",
|
||||
contentStyle: {
|
||||
borderBottomColor: AccentColor.blue,
|
||||
borderBottomWidth: 2,
|
||||
},
|
||||
// headerLargeStyle: {
|
||||
// backgroundColor: MainColor.darkblue,
|
||||
// },
|
||||
// headerShadowVisible: false,
|
||||
}}
|
||||
>
|
||||
<Stack.Screen
|
||||
name="index"
|
||||
// options={{
|
||||
// title: "Login",
|
||||
// headerStyle: { backgroundColor: MainColor.darkblue },
|
||||
// headerTitleStyle: { color: MainColor.yellow, fontWeight: "bold" },
|
||||
// headerTitleAlign: "center",
|
||||
// headerRight: () => (
|
||||
// <MaterialIcons name="rocket" size={20} color={MainColor.yellow} />
|
||||
// ),
|
||||
// headerLeft: () => (
|
||||
// <Icon name="rocket" size={20} color={MainColor.yellow} />
|
||||
// ),
|
||||
// }}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<Stack.Screen name="verification" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="register" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="(application)" options={{ headerShown: false }} />
|
||||
</Stack>
|
||||
</SafeAreaProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import Spacing from "@/components/_ShareComponent/Spacing";
|
||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||
import ButtonCustom from "@/components/Button/ButtonCustom";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { globalStyles } from "@/constants/global-styles";
|
||||
import { useRouter } from "expo-router";
|
||||
import { Stack, useRouter } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import { Text, View } from "react-native";
|
||||
import PhoneInput, { ICountry } from "react-native-international-phone-number";
|
||||
import { MaterialIcons } from "@expo/vector-icons";
|
||||
|
||||
export default function Login() {
|
||||
const router = useRouter();
|
||||
@@ -30,6 +32,7 @@ export default function Login() {
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
<ViewWrapper>
|
||||
<View
|
||||
style={{
|
||||
|
||||
@@ -39,7 +39,10 @@ export default function Register() {
|
||||
backgroundColor={MainColor.yellow}
|
||||
textColor={MainColor.black}
|
||||
radius={10}
|
||||
onPress={() => router.push("/(application)")}
|
||||
onPress={() => (
|
||||
console.log("Success register"),
|
||||
router.push("/(application)/home")
|
||||
)}
|
||||
/>
|
||||
{/* <Spacing height={10} />
|
||||
<ButtonCustom
|
||||
|
||||
Reference in New Issue
Block a user