From f1d86812e9a045b474f4a1c8cd3621fe17b8b806 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Wed, 13 Mar 2024 00:58:37 +0000
Subject: mobile: Introduce a tab layout and move the sharing page into a modal

---
 packages/mobile/app/dashboard.tsx | 38 --------------------------------------
 1 file changed, 38 deletions(-)
 delete mode 100644 packages/mobile/app/dashboard.tsx

(limited to 'packages/mobile/app/dashboard.tsx')

diff --git a/packages/mobile/app/dashboard.tsx b/packages/mobile/app/dashboard.tsx
deleted file mode 100644
index b4f535c5..00000000
--- a/packages/mobile/app/dashboard.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { useRouter } from "expo-router";
-import { useEffect } from "react";
-import { Text, View } from "react-native";
-
-import Logo from "@/components/Logo";
-import { Button } from "@/components/ui/Button";
-import { useSession } from "@/lib/session";
-import { api } from "@/lib/trpc";
-
-export default function Dashboard() {
-  const router = useRouter();
-
-  const { isLoggedIn, logout } = useSession();
-
-  useEffect(() => {
-    if (isLoggedIn !== undefined && !isLoggedIn) {
-      router.replace("signin");
-    }
-  }, [isLoggedIn]);
-
-  const { data, error, isLoading } = api.users.whoami.useQuery();
-
-  useEffect(() => {
-    if (error?.data?.code === "UNAUTHORIZED") {
-      logout();
-    }
-  }, [error]);
-
-  return (
-    <View className="flex h-full items-center justify-center gap-4 px-4">
-      <Logo />
-      <Text className="justify-center">
-        Logged in as: {isLoading ? "Loading ..." : data?.email}
-      </Text>
-      <Button label="Log Out" onPress={logout} />
-    </View>
-  );
-}
-- 
cgit v1.2.3-70-g09d2

