Skip to content

Commit

Permalink
fix(mobile): fix select category field layout (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkdev98 authored Jul 23, 2024
1 parent f28f58a commit 31ba455
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/mobile/components/transaction/select-category-field.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { sleep } from '@/lib/utils'
import { useCategories } from '@/queries/category'
import type { Category } from '@6pm/validation'
import {
BottomSheetBackdrop,
Expand All @@ -15,6 +14,7 @@ import { FlatList, Keyboard, View } from 'react-native'

import { useColorScheme } from '@/hooks/useColorScheme'
import { theme } from '@/lib/theme'
import { useCategoryList } from '@/stores/category/hooks'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import { FullWindowOverlay } from 'react-native-screens'
import GenericIcon from '../common/generic-icon'
Expand All @@ -27,7 +27,7 @@ export function SelectCategoryField({
onSelect?: (category: Category) => void
}) {
const { bottom } = useSafeAreaInsets()
const { data: categories = [], isLoading } = useCategories()
const { categories = [], isLoading } = useCategoryList()
const { colorScheme } = useColorScheme()

const sheetRef = useRef<BottomSheetModal>(null)
Expand Down Expand Up @@ -109,6 +109,7 @@ export function SelectCategoryField({
<FlatList
data={section.data}
numColumns={4}
columnWrapperClassName="flex-wrap"
keyExtractor={(i) => i.id}
showsVerticalScrollIndicator={false}
showsHorizontalScrollIndicator={false}
Expand Down

0 comments on commit 31ba455

Please sign in to comment.