Skip to content

Commit

Permalink
Modal updates
Browse files Browse the repository at this point in the history
  • Loading branch information
koredefashokun committed Oct 29, 2024
1 parent 90781d9 commit c2a04f8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion apps/dashboard/src/components/store/StoreSelectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ import {
BottomSheetView
} from '@gorhom/bottom-sheet';
import { Button, Spacer, Typography, useTheme } from '@habiti/components';
import { View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';

import { useManagedStoresQuery } from '../../types/api';

interface StoreSelectModalProps {
modalRef: React.RefObject<BottomSheetModal>;
}

const StoreSelectModal: React.FC<StoreSelectModalProps> = ({ modalRef }) => {
const { theme } = useTheme();
const { bottom } = useSafeAreaInsets();
const [{ data }] = useManagedStoresQuery();

return (
<BottomSheetModal
Expand All @@ -30,9 +34,15 @@ const StoreSelectModal: React.FC<StoreSelectModalProps> = ({ modalRef }) => {
backgroundStyle={{ backgroundColor: theme.screen.background }}
>
<BottomSheetView style={{ paddingBottom: bottom, paddingHorizontal: 16 }}>
<Typography size='xlarge' weight='medium'>
<Typography size='xlarge' weight='bold'>
Select store
</Typography>
<Spacer y={8} />
{data?.currentUser.managed.map(({ id, store }) => (
<View key={store.id} style={{ paddingVertical: 8 }}>
<Typography>{store.name}</Typography>
</View>
))}
<Spacer y={16} />
<Button onPress={() => {}} text='Create new store' />
</BottomSheetView>
Expand Down

0 comments on commit c2a04f8

Please sign in to comment.