fix folder component

This commit is contained in:
2025-06-26 10:29:22 +08:00
parent 33bee642a0
commit bff2a89903
16 changed files with 198 additions and 141 deletions

View File

@@ -1,11 +1,11 @@
/* 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";
import { Text, TouchableOpacity } from "react-native";
export default function TabsLayout() {
return (
<>
<Tabs
@@ -26,7 +26,24 @@ export default function TabsLayout() {
<Entypo name="chat" size={20} color={MainColor.white} />
),
headerLeft: () => (
<Ionicons name="arrow-back" onPress={() => {router.back()}} size={20} color={MainColor.white} />
<Ionicons
name="arrow-back"
onPress={() => {
router.back();
}}
size={20}
color={MainColor.white}
/>
),
tabBarButton: () => (
<TouchableOpacity
onPress={() => {
router.navigate("/event");
}}
>
<Entypo name="chat" size={20} color={MainColor.white} />
<Text style={{ color: MainColor.white }}>Event</Text>
</TouchableOpacity>
),
}}
/>

View File

@@ -1,9 +1,8 @@
/* 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";
import { Stack } from "expo-router";
import React from "react";
import { View } from "react-native";
export default function Tabs() {
// const router = useRouter();
@@ -16,7 +15,25 @@ export default function Tabs() {
return (
<>
<HomeView />
<View>
<Stack.Screen
options={{
title: "My home",
headerStyle: { backgroundColor: MainColor.darkblue },
headerTintColor: "#fff",
headerTitleStyle: {
fontWeight: "bold",
},
// headerTitle: (props) => <LogoTitle {...props} />,
}}
/>
<HomeView />
{/* <Text>Home Screen</Text>
<Link href={{ pathname: "/(application)/(tabs)/forum" }}>
Go to Details
</Link> */}
</View>
</>
);
}

View File

@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { AccentColor, MainColor } from "@/constants/color-palet";
import { Ionicons } from "@expo/vector-icons";
import { Stack } from "expo-router";
import { router, Stack } from "expo-router";
export default function ApplicationLayout() {
return (
@@ -18,13 +17,12 @@ export default function ApplicationLayout() {
headerLargeStyle: {
backgroundColor: MainColor.darkblue,
},
headerShadowVisible: false,
}}
>
<Stack.Screen
name="(tabs)"
options={{
headerShown: false,
headerShown: false,
// title: "iii",
// headerLeft: () => (
// <Ionicons name="search" size={20} color={MainColor.white} />
@@ -34,7 +32,36 @@ export default function ApplicationLayout() {
// ),
}}
/>
{/* <Stack.Screen name="forum/index" options={{ title: "Forum", }} /> */}
<Stack.Screen
name="event/index"
options={{
title: "Event",
headerLeft: () => (
<Ionicons
name="arrow-back"
size={20}
color={MainColor.yellow}
onPress={() => router.back()}
/>
),
}}
/>
{/* <Stack.Screen
name="home"
options={{
title: "HIPMI",
headerLeft: () => (
<Ionicons name="search" size={20} color={MainColor.yellow} />
),
headerRight: () => (
<Ionicons
name="notifications"
size={20}
color={MainColor.yellow}
/>
),
}}
/> */}
</Stack>
</>
);

View File

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

View File

@@ -1,9 +1,16 @@
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
import HomeView from "@/components/Home/HomeView";
import { Styles } from "@/constants/global-styles";
import { View } from "react-native";
export default function Application() {
return (
<>
<HomeView />
<ViewWrapper>
<View style={Styles.container}>
<HomeView />
</View>
</ViewWrapper>
</>
);
}