Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

_layout.tsx

50 lines1.7 KB

1import Stack from "expo-router/stack";
2import { useResolveClassNames } from "uniwind";
3​
4import { NewTaskFlowProvider } from "../../features/threads/new-task-flow-provider";
5import { useThemeColor } from "../../lib/useThemeColor";
6​
7export const unstable_settings = {
8 anchor: "index",
9};
10​
11export default function NewTaskLayout() {
12 const sheetStyle = useResolveClassNames("bg-sheet");
13 const sheetBg = useThemeColor("--color-sheet");
14 const headerTint = useThemeColor("--color-foreground");
15​
16 return (
17 <NewTaskFlowProvider>
18 <Stack
19 screenOptions={{
20 contentStyle: sheetStyle,
21 headerBackButtonDisplayMode: "minimal",
22 headerLargeTitle: false,
23 headerShadowVisible: false,
24 headerStyle: { backgroundColor: sheetBg },
25 headerTintColor: headerTint,
26 headerTitleStyle: { fontFamily: "DMSans_700Bold" },
27 }}
28 >
29 <Stack.Screen name="index" options={{ animation: "none", title: "Choose project" }} />
30 <Stack.Screen
31 name="add-project/index"
32 options={{ animation: "slide_from_right", title: "New project" }}
33 />
34 <Stack.Screen
35 name="add-project/repository"
36 options={{ animation: "slide_from_right", title: "Repository" }}
37 />
38 <Stack.Screen
39 name="add-project/destination"
40 options={{ animation: "slide_from_right", title: "Clone destination" }}
41 />
42 <Stack.Screen
43 name="add-project/local"
44 options={{ animation: "slide_from_right", title: "Local folder" }}
45 />
46 <Stack.Screen name="draft" options={{ animation: "slide_from_right", title: "New task" }} />
47 </Stack>
48 </NewTaskFlowProvider>
49 );