reasourcing home

This commit is contained in:
2025-06-25 14:57:05 +08:00
parent 4835d51f35
commit 33bee642a0
21 changed files with 549 additions and 77 deletions

View 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>
</>
);
}

View 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>
</>
}

View File

@@ -0,0 +1,9 @@
import { Text, View } from "react-native";
export default function Forum() {
return (
<View>
<Text>Tabs Forum</Text>
</View>
);
}

View 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 />
</>
);
}

View File

@@ -0,0 +1,9 @@
import { Text, View } from "react-native";
export default function Maps() {
return (
<View>
<Text>Maps</Text>
</View>
);
}

View File

@@ -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>
</>
);
}

View File

@@ -0,0 +1,9 @@
import HomeView from "@/components/Home/HomeView";
export default function Application() {
return (
<>
<HomeView />
</>
);
}

View File

@@ -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>
);
}

View File

@@ -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>
);
}