Skip to content

Commit

Permalink
feature(mobile): Show server address in the settings
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed May 12, 2024
1 parent e6c9ef4 commit 8521580
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/mobile/app/dashboard/(tabs)/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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}
Expand Down

0 comments on commit 8521580

Please sign in to comment.