mirror of
https://github.com/khairul169/home-lab.git
synced 2026-10-11 21:43:59 +07:00
chore: initial commit
This commit is contained in:
@@ -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;
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user