From 8521580ffa8573ab6edb3dbeb78765cb728ae7ad Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Mon, 6 May 2024 19:45:08 +0100
Subject: feature(mobile): Show server address in the settings

---
 apps/mobile/app/dashboard/(tabs)/settings.tsx | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'apps/mobile/app/dashboard/(tabs)/settings.tsx')

diff --git a/apps/mobile/app/dashboard/(tabs)/settings.tsx b/apps/mobile/app/dashboard/(tabs)/settings.tsx
index 93033926..73d1b42d 100644
--- a/apps/mobile/app/dashboard/(tabs)/settings.tsx
+++ b/apps/mobile/app/dashboard/(tabs)/settings.tsx
@@ -3,10 +3,12 @@ import { Button } from "@/components/ui/Button";
 import CustomSafeAreaView from "@/components/ui/CustomSafeAreaView";
 import PageTitle from "@/components/ui/PageTitle";
 import { useSession } from "@/lib/session";
+import useAppSettings from "@/lib/settings";
 import { api } from "@/lib/trpc";
 
 export default function Dashboard() {
   const { logout } = useSession();
+  const { settings, isLoading: isSettingsLoading } = useAppSettings();
 
   const { data, error, isLoading } = api.users.whoami.useQuery();
 
@@ -17,7 +19,12 @@ export default function Dashboard() {
   return (
     <CustomSafeAreaView>
       <PageTitle title="Settings" />
-      <View className="flex h-full w-full items-center gap-4 px-4 py-2">
+      <View className="flex h-full w-full items-center gap-3 px-4 py-2">
+        <View className="w-full rounded-lg bg-white px-4 py-2 dark:bg-accent">
+          <Text className="text-lg text-accent-foreground">
+            {isSettingsLoading ? "Loading ..." : settings.address}
+          </Text>
+        </View>
         <View className="w-full rounded-lg bg-white px-4 py-2 dark:bg-accent">
           <Text className="text-lg text-accent-foreground">
             {isLoading ? "Loading ..." : data?.email}
-- 
cgit v1.2.3-70-g09d2

