diff --git a/app/(application)/(tabs)/_layout.tsx b/app/(application)/(home-tabs)/_layout.tsx similarity index 58% rename from app/(application)/(tabs)/_layout.tsx rename to app/(application)/(home-tabs)/_layout.tsx index 2c2d2f8..d66f4af 100644 --- a/app/(application)/(tabs)/_layout.tsx +++ b/app/(application)/(home-tabs)/_layout.tsx @@ -1,9 +1,8 @@ //app/(application)/(tabs)/_layout.tsx import { MainColor } from "@/constants/color-palet"; -import { Entypo, Ionicons } from "@expo/vector-icons"; -import { router, Tabs } from "expo-router"; -import { Text, TouchableOpacity } from "react-native"; +import { Entypo } from "@expo/vector-icons"; +import { Tabs } from "expo-router"; export default function TabsLayout() { return ( @@ -18,35 +17,6 @@ export default function TabsLayout() { }} > - ( - - ), - headerLeft: () => ( - { - router.back(); - }} - size={20} - color={MainColor.white} - /> - ), - tabBarButton: () => ( - { - router.navigate("/event"); - }} - > - - Event - - ), - }} - /> + + ( + + ), + }} + /> ); diff --git a/app/(application)/(tabs)/forum/index.tsx b/app/(application)/(home-tabs)/forum/index.tsx similarity index 58% rename from app/(application)/(tabs)/forum/index.tsx rename to app/(application)/(home-tabs)/forum/index.tsx index f90c396..df14d47 100644 --- a/app/(application)/(tabs)/forum/index.tsx +++ b/app/(application)/(home-tabs)/forum/index.tsx @@ -2,8 +2,10 @@ import { Text, View } from "react-native"; export default function Forum() { return ( - - Tabs Forum - + <> + + Forum + + ); } diff --git a/app/(application)/(home-tabs)/index.tsx b/app/(application)/(home-tabs)/index.tsx new file mode 100644 index 0000000..28523eb --- /dev/null +++ b/app/(application)/(home-tabs)/index.tsx @@ -0,0 +1,30 @@ +import HomeView from "@/screens/Home/HomeView"; +import { Styles } from "@/styles/global-styles"; +import { Stack } from "expo-router"; +import React from "react"; +import { View } from "react-native"; + +export default function Tabs() { + // const router = useRouter(); + // const navigation = useNavigation(); + // useEffect(() => { + // navigation.setOptions({ + + // }); + // }, [navigation]); + + return ( + <> + + + + + + ); +} diff --git a/app/(application)/(tabs)/katalog.tsx b/app/(application)/(home-tabs)/katalog.tsx similarity index 100% rename from app/(application)/(tabs)/katalog.tsx rename to app/(application)/(home-tabs)/katalog.tsx diff --git a/app/(application)/(tabs)/maps.tsx b/app/(application)/(home-tabs)/maps.tsx similarity index 100% rename from app/(application)/(tabs)/maps.tsx rename to app/(application)/(home-tabs)/maps.tsx diff --git a/app/(application)/(tabs)/forum/_layout.tsx b/app/(application)/(tabs)/forum/_layout.tsx deleted file mode 100644 index 6ac1679..0000000 --- a/app/(application)/(tabs)/forum/_layout.tsx +++ /dev/null @@ -1,10 +0,0 @@ -//app/(application)/(tabs)/forum/_layout.tsx -import { Stack } from "expo-router"; - -export default function ForumLayout() { - return<> - - - - -} diff --git a/app/(application)/(tabs)/index.tsx b/app/(application)/(tabs)/index.tsx deleted file mode 100644 index 872b4d5..0000000 --- a/app/(application)/(tabs)/index.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import HomeView from "@/screens/Home/HomeView"; -import { MainColor } from "@/constants/color-palet"; -import { Stack } from "expo-router"; -import React from "react"; -import { View } from "react-native"; - -export default function Tabs() { - // const router = useRouter(); - // const navigation = useNavigation(); - // useEffect(() => { - // navigation.setOptions({ - - // }); - // }, [navigation]); - - return ( - <> - - , - }} - /> - - {/* Home Screen - - Go to Details - */} - - - ); -} diff --git a/app/(application)/_layout.tsx b/app/(application)/_layout.tsx index 9c84311..32c104d 100644 --- a/app/(application)/_layout.tsx +++ b/app/(application)/_layout.tsx @@ -20,18 +20,12 @@ export default function ApplicationLayout() { }} > ( - // - // ), - // headerRight: () => ( - // - // ), + headerShown: false, }} /> + - {/* ( - - ), - headerRight: () => ( - - ), - }} - /> */} ); diff --git a/navigation/types.ts b/navigation/types.ts new file mode 100644 index 0000000..6006a1b --- /dev/null +++ b/navigation/types.ts @@ -0,0 +1,40 @@ +// src/navigation/types.ts + +import { NavigatorScreenParams } from "@react-navigation/native"; + +// Tipe untuk Tab Navigator utama di (home-tabs) +export type HomeTabParamList = { + index: undefined; // Diperbarui: Tab default (sekarang dinamakan index) + maps: undefined; + profile: undefined; +}; + +// Tipe untuk Stack Navigator Event +export type EventStackParamList = { + index: undefined; // Rute root untuk Event (misalnya, daftar event) + // Anda bisa menambahkan rute event lain di sini, contoh: + // '[id]': { id: string }; // Untuk detail event +}; + +// Tipe untuk Stack Navigator Autentikasi +export type AuthStackParamList = { + index: undefined; // Layar Login + register: undefined; // Layar Pendaftaran + verification: undefined; // Layar Verifikasi +}; + +// Tipe untuk Stack Navigator Utama Aplikasi (setelah autentikasi) +export type AppStackParamList = { + "(home-tabs)": NavigatorScreenParams; // Mengarah ke Tab Navigator + event: NavigatorScreenParams; // Mengarah ke Event Stack + forum: undefined; // NEW: Halaman Forum, sebagai Stack Screen terpisah + // Anda bisa menambahkan rute stack lain di sini yang tidak termasuk dalam grup di atas +}; + +// Gabungkan semua tipe rute utama ke dalam RootParamList global +// Ini memungkinkan penggunaan useNavigation dan useRouter dengan tipe yang benar +declare global { + namespace ReactNavigation { + interface RootParamList extends AuthStackParamList, AppStackParamList {} + } +} diff --git a/screens/Authentication/RegisterView.tsx b/screens/Authentication/RegisterView.tsx index f12e41d..49ca539 100644 --- a/screens/Authentication/RegisterView.tsx +++ b/screens/Authentication/RegisterView.tsx @@ -40,7 +40,7 @@ export default function RegisterView() { radius={10} onPress={() => ( console.log("Success register"), - router.push("/(application)/(tabs)") + router.push("/(application)/(home-tabs)") )} /> diff --git a/styles/global-styles.ts b/styles/global-styles.ts index 0866750..9281469 100644 --- a/styles/global-styles.ts +++ b/styles/global-styles.ts @@ -45,6 +45,15 @@ export const Styles = StyleSheet.create({ fontWeight: "normal", }, + // Stack Header Style + headerStyle: { + backgroundColor: MainColor.darkblue, + }, + headerTitleStyle: { + color: MainColor.yellow, + fontWeight: "bold", + }, + // HOME homeContainer: { flex: 1,