diff --git a/apps/mobile/src/screens/settings/library/CloudSettings.tsx b/apps/mobile/src/screens/settings/library/CloudSettings.tsx index 91d09b7c2..b2d25c5ee 100644 --- a/apps/mobile/src/screens/settings/library/CloudSettings.tsx +++ b/apps/mobile/src/screens/settings/library/CloudSettings.tsx @@ -6,7 +6,7 @@ import VirtualizedListWrapper from '~/components/layout/VirtualizedListWrapper'; import { Button } from '~/components/primitive/Button'; import { Divider } from '~/components/primitive/Divider'; import { SettingsTitle } from '~/components/settings/SettingsContainer'; -import { styled, tw } from '~/lib/tailwind'; +import { styled, tw, twStyle } from '~/lib/tailwind'; import { cancel, login, useAuthStateSnapshot } from '~/stores/auth'; const InfoBox = styled(View, 'rounded-md border border-app bg-transparent p-2'); @@ -48,7 +48,7 @@ const Authenticated = () => { Library - + Name {cloudLibrary.data.name} @@ -67,17 +67,17 @@ const Authenticated = () => { {thisInstance && ( This Instance - + Id {thisInstance.id} - UUID + UUID {thisInstance.uuid} - Public Key + Public Key {thisInstance.identity} @@ -92,17 +92,17 @@ const Authenticated = () => { Instances - + } - columnWrapperStyle={tw`justify-between w-full`} - renderItem={({ item }) => } + renderItem={({ item }) => } keyExtractor={(item) => item.id} - numColumns={2} + numColumns={(cloudInstances?.length ?? 0) > 1 ? 2 : 1} + {...(cloudInstances?.length ?? 0) > 1 ? {columnWrapperStyle: tw`w-full justify-between`} : {}} /> @@ -127,20 +127,21 @@ const Authenticated = () => { interface Props { data: CloudInstance; + length: number; } -const Instance = ({data}: Props) => { +const Instance = ({data, length}: Props) => { return ( - + 1 ? 'w-[49%]' : 'w-full')}> Id {data.id} - UUID + UUID {data.uuid} - Public Key + Public Key {data.identity}