fix gluestackUI

This commit is contained in:
Patryk
2025-04-23 20:46:34 +02:00
parent b248aee33d
commit 877f232e98
62 changed files with 4571 additions and 3841 deletions

View File

@@ -1,32 +0,0 @@
import { Link, Stack } from 'expo-router';
import { StyleSheet } from 'react-native';
import { ThemedText } from '@/components/ThemedText';
import { ThemedView } from '@/components/ThemedView';
export default function NotFoundScreen() {
return (
<>
<Stack.Screen options={{ title: 'Oops!' }} />
<ThemedView style={styles.container}>
<ThemedText type="title">This screen doesn't exist.</ThemedText>
<Link href="/" style={styles.link}>
<ThemedText type="link">Go to home screen!</ThemedText>
</Link>
</ThemedView>
</>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
padding: 20,
},
link: {
marginTop: 15,
paddingVertical: 15,
},
});

View File

@@ -0,0 +1,11 @@
import {Tabs} from 'expo-router';
import "@/global.css";
import { GluestackUIProvider } from '@/components/ui/gluestack-ui-provider';
export default function RootLayout(){
return (
<GluestackUIProvider>
<Tabs/>
</GluestackUIProvider>
);
}

View File

@@ -1,21 +0,0 @@
import { Stack } from "expo-router";
import "@/global.css";
import { GluestackUIProvider } from "@/components/ui/gluestack-ui-provider";
import { Appearance } from "react-native";
import {Colors} from "@/constants/Colors"
export default function RootLayout() {
const colorScheme = Appearance.getColorScheme();
const theme = colorScheme === 'dark' ? Colors.dark :
Colors.light;
return (
<GluestackUIProvider mode="light"><Stack screenOptions={{ headerStyle: {backgroundColor:theme.background},
headerTintColor: theme.text
}}>
<Stack.Screen name="index"/>
<Stack.Screen name="+not-found" options={{headerShown:false}}/>
</Stack></GluestackUIProvider>
);
}

View File

@@ -1,21 +1,12 @@
import { Text, View, Pressable } from "react-native";
import { Link } from "expo-router";
import { Button, ButtonText } from "@/components/ui/button"
export default function Index() {
import { View, Text } from 'react-native';
import { Button, ButtonText } from '@/components/ui/button';
export default function Home(){
return (
<View>
<Link href="/notices" asChild>
<Pressable>
<Text>Notices</Text>
</Pressable>
</Link>
<Button size="md" variant="solid" action="primary">
<ButtonText>Zobacz ogłoszenie</ButtonText>
</Button>
<Text>Home</Text>
<Button>
<ButtonText>Click Me</ButtonText>
</Button>
</View>
);
}
}

View File

@@ -1,27 +1,8 @@
import { Appearance, StyleSheet, Platform,
SafeAreaView,FlatList, ScrollView, View, Text } from "react-native";
import { View, Text } from 'react-native';
import NoticeCard from '@/components/NoticeCard';
import { Colors } from "@/constants/Colors";
import { MENU_ITEMS } from "@/constants/NoticeItems";
export default function MenuScreen(){
const colorScheme = Appearance.getColorScheme();
const theme = colorScheme === 'dark' ? Colors.dark : Colors.light;
const Container = Platform.OS === 'web' ? ScrollView : SafeAreaView;
return(
<Container>
<FlatList
data={MENU_ITEMS}
keyExtractor={(item) => item.id.toString()}
renderItem={({ item }) => (
<View>
<Text>{item.title}</Text>
</View>
)}
></FlatList>
</Container>
)
export default function Catalog() {
return (
<NoticeCard/>
);
}