chore: initial commit

This commit is contained in:
2024-03-09 18:48:49 +07:00
commit 01e5ae1a19
27 changed files with 8511 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import React from "react";
import { Slot } from "expo-router";
import { QueryClientProvider } from "react-query";
import queryClient from "@/lib/queryClient";
import { View } from "react-native";
import { cn } from "@/lib/utils";
import { StatusBar } from "expo-status-bar";
import { useSafeAreaInsets } from "react-native-safe-area-context";
const RootLayout = () => {
const insets = useSafeAreaInsets();
return (
<QueryClientProvider client={queryClient}>
<StatusBar style="auto" />
<View style={cn("flex-1 bg-white", { paddingTop: insets.top })}>
<Slot />
</View>
</QueryClientProvider>
);
};
export default RootLayout;
+27
View File
@@ -0,0 +1,27 @@
import { Text } from "react-native";
import React from "react";
import { cn } from "@/lib/utils";
import useAPI from "@/hooks/useAPI";
import { Ionicons } from "@ui/Icons";
import { VStack } from "@ui/Stack";
import Button from "@ui/Button";
const App = () => {
const { data } = useAPI("/posts/1");
return (
<VStack className="gap-3 p-4">
<Text style={cn("text-2xl font-medium")}>App</Text>
<Text style={cn("w-full")}>{data?.body}</Text>
<Button label="Click me" />
<Button label="Click me" variant="secondary" />
<Button label="Click me" variant="ghost" />
<Button label="Click me" variant="outline" />
<Button label="Click me" variant="destructive" />
<Button icon={<Ionicons name="trash" />} size="icon" />
</VStack>
);
};
export default App;