Anul 3 Semestrul 1
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { store } from "@/redux/store";
|
||||
import { Stack } from "expo-router";
|
||||
import { Provider } from "react-redux";
|
||||
import { useMaterial3Theme } from "@pchmn/expo-material3-theme";
|
||||
import { MD3DarkTheme, MD3LightTheme, PaperProvider } from "react-native-paper";
|
||||
import { StatusBar, useColorScheme, Text } from "react-native";
|
||||
import { DataLoader } from "@/components/DataLoader";
|
||||
|
||||
|
||||
export default function RootLayout() {
|
||||
const colorScheme = useColorScheme();
|
||||
const {theme} = useMaterial3Theme();
|
||||
const paperTheme =
|
||||
colorScheme === 'dark'
|
||||
? { ...MD3DarkTheme, colors: theme.dark }
|
||||
: { ...MD3LightTheme, colors: theme.light };
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<DataLoader />
|
||||
<PaperProvider theme={paperTheme}>
|
||||
<StatusBar
|
||||
hidden={true}
|
||||
/>
|
||||
<Stack>
|
||||
<Stack.Screen name="index" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="add" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="update/[id]" options={{ headerShown: false }} />
|
||||
</Stack>
|
||||
</PaperProvider>
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import DrugList from "@/components/DrugList";
|
||||
import Form from "@/components/Form";
|
||||
import { Link } from "expo-router";
|
||||
import { Dimensions, Text, View } from "react-native";
|
||||
import { useTheme } from "react-native-paper";
|
||||
|
||||
export default function Add() {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<View style={{width: "100%", backgroundColor:theme.colors.surface, height: Dimensions.get('window').height}}>
|
||||
<Form />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import DrugList from "@/components/DrugList";
|
||||
import { Dimensions, Text, View } from "react-native";
|
||||
import { useTheme } from "react-native-paper";
|
||||
|
||||
|
||||
export default function Index() {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
<View style={{width: "100%", backgroundColor:theme.colors.surface, height: Dimensions.get('window').height}}>
|
||||
<DrugList />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import Form from "@/components/Form";
|
||||
import { Link, useLocalSearchParams } from "expo-router";
|
||||
import { Dimensions, Text, View } from "react-native";
|
||||
import { useTheme } from "react-native-paper";
|
||||
|
||||
export default function Update() {
|
||||
const { id } = useLocalSearchParams() as { id: string };
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<View style={{width: "100%", backgroundColor:theme.colors.surface, height: Dimensions.get('window').height}}>
|
||||
<Form drugId={parseInt(id)} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user