resourcing tabs
deskripsi: - coba tabs
This commit is contained in:
28
app/(application)/_layout.tsx
Normal file
28
app/(application)/_layout.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||
import { Entypo } from "@expo/vector-icons";
|
||||
import { Tabs } from "expo-router";
|
||||
|
||||
export default function ApplicationLayout() {
|
||||
return (
|
||||
<>
|
||||
<Tabs>
|
||||
<Tabs.Screen name="index" options={{ href: null }} />
|
||||
<Tabs.Screen
|
||||
name="home/index"
|
||||
options={{
|
||||
title: "Home",
|
||||
tabBarIcon: () => <Entypo name="home" size={24} color="black" />,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="katalog/index"
|
||||
options={{
|
||||
title: "Katalog",
|
||||
tabBarIcon: () => <Entypo name="book" size={24} color="black" />,
|
||||
}}
|
||||
/>
|
||||
</Tabs>
|
||||
</>
|
||||
);
|
||||
}
|
||||
19
app/(application)/home/index.tsx
Normal file
19
app/(application)/home/index.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
28
app/(application)/index.tsx
Normal file
28
app/(application)/index.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
/* 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>
|
||||
);
|
||||
}
|
||||
9
app/(application)/katalog/index.tsx
Normal file
9
app/(application)/katalog/index.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Text, View } from "react-native";
|
||||
|
||||
export default function Katalog() {
|
||||
return (
|
||||
<View>
|
||||
<Text>Katalog</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user