location show page

This commit is contained in:
Patryk
2025-04-09 20:37:52 +02:00
parent 25a1ed4f35
commit 16598e9217
4 changed files with 20 additions and 8 deletions

View File

@@ -24,9 +24,6 @@ export default function TabLayout() {
<Tabs.Screen name="index" options={{ title: 'Home',tabBarIcon: ({ color, focused }) => ( <Tabs.Screen name="index" options={{ title: 'Home',tabBarIcon: ({ color, focused }) => (
<Ionicons name={focused ? 'home-sharp' : 'home-outline'} color={color} size={24} /> <Ionicons name={focused ? 'home-sharp' : 'home-outline'} color={color} size={24} />
), }} /> ), }} />
{/* <Tabs.Screen name="location" options={{ title: 'Location' ,tabBarButton: ()=> null,tabBarIcon: ({ color, focused }) => (
<Ionicons name={focused ? 'location-sharp' : 'location-outline'} color={color} size={24} />
),}} /> */}
<Tabs.Screen name="formScreen" options={{title: 'Create/Edit' ,tabBarIcon: ({ color, focused }) => ( <Tabs.Screen name="formScreen" options={{title: 'Create/Edit' ,tabBarIcon: ({ color, focused }) => (
<Ionicons name={focused ? 'add-circle-sharp' : 'add-circle-outline'} color={color} size={24} /> <Ionicons name={focused ? 'add-circle-sharp' : 'add-circle-outline'} color={color} size={24} />
),}} /> ),}} />

View File

@@ -10,8 +10,20 @@ MD3LightTheme;
export default function RootLayout() { export default function RootLayout() {
return ( return (
<PaperProvider theme={theme} > <PaperProvider theme={theme} >
<Stack> <Stack screenOptions={{
headerStyle: {
backgroundColor: theme.colors.primaryContainer,
borderBottomWidth:0
},
headerTintColor: theme.colors.primary,
}}>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} /> <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen
name="location/[id]"
options={{
title: "Lokalizacja",
headerBackTitle: "Powrót",
}}/>
</Stack> </Stack>
</PaperProvider> </PaperProvider>
); );

View File

@@ -17,11 +17,14 @@ export default function Location() {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<ScrollView> <ScrollView>
<Card> <Card style={{ margin: 10}}>
<Card.Cover style={{marginBottom: 10}} source={{ uri: location.image }} /> <Card.Cover style={{marginBottom: 10}} source={{ uri: location.image }} />
<Card.Content style={{marginBottom: 10}}> <Card.Content style={{marginBottom: 10}}>
<Text variant="headlineLarge" style={{marginBottom: 10}}> <Text variant="headlineLarge" style={{marginBottom: 10}}>
Opis {location.name}
</Text>
<Text variant="headlineLarge" style={{marginBottom: 10}}>
Opis:
</Text> </Text>
<Text variant="bodyMedium"> <Text variant="bodyMedium">
{location.longDescription} {location.longDescription}
@@ -30,7 +33,7 @@ export default function Location() {
<Card.Content> <Card.Content>
<Text variant="headlineLarge" style={{marginBottom: 10}}> <Text variant="headlineLarge" style={{marginBottom: 10}}>
Statystyki Statystyki:
</Text> </Text>
<Text variant="bodyMedium" style={{marginBottom: 10}}> <Text variant="bodyMedium" style={{marginBottom: 10}}>
Powierzchnia: {location.area} km² Powierzchnia: {location.area} km²

View File

@@ -15,5 +15,5 @@
"**/*.ts", "**/*.ts",
"**/*.tsx", "**/*.tsx",
"**/*.jsx" "**/*.jsx"
, "app/(tabs)/location/[id].js" ] , "app/location/[id].jss" ]
} }