Skip to content
34 linesCodeBlameRaw
1import { Stack } from "expo-router";
2import * as WebBrowser from "expo-web-browser";
3import type { LucideIcon } from "lucide-react-native";
4import { ExternalLink } from "lucide-react-native";
5
6import { Button, Empty, Screen } from "@/components/ui";
7import { siteUrl } from "@/lib/server";
8import { useSignedIn } from "@/lib/session";
9
10/**
11 * A part of g1t the app has no screens for yet: what it is, and the way
12 * to it on the site meanwhile.
13 */
14export function ComingSoon({ title, icon, body, path }: { title: string; icon: LucideIcon; body: string; path: (workspace: string) => string }) {
15 const { server, workspace } = useSignedIn();
16 return (
17 <Screen>
18 <Stack.Screen options={{ title }} />
19 <Empty
20 icon={icon}
21 title={`${title} is coming to the app`}
22 body={body}
23 action={
24 <Button
25 title="Open on g1t"
26 variant="secondary"
27 icon={ExternalLink}
28 onPress={() => WebBrowser.openBrowserAsync(siteUrl(server, path(workspace?.slug ?? "")))}
29 />
30 }
31 />
32 </Screen>
33 );
34}