diff --git a/apps/expo/app/(app)/(drawer)/(tabs)/feed/index.tsx b/apps/expo/app/(app)/(drawer)/(tabs)/feed/index.tsx index 42789c972..a34fc0520 100644 --- a/apps/expo/app/(app)/(drawer)/(tabs)/feed/index.tsx +++ b/apps/expo/app/(app)/(drawer)/(tabs)/feed/index.tsx @@ -1,8 +1,8 @@ import { DrawerToggleButton } from '@react-navigation/drawer'; -import { searchQueryAtom } from 'app/atoms/feed'; import { useRouterSettings } from 'app/hooks/router'; import useTheme from 'app/hooks/useTheme'; import { FeedScreen } from 'app/modules/feed'; +import { searchQueryAtom } from 'app/modules/feed/atoms'; import { Stack } from 'expo-router'; import Head from 'expo-router/head'; import { useSetAtom } from 'jotai'; diff --git a/packages/app/components/FilterBadge.tsx b/packages/app/components/FilterBadge.tsx index 846c3102b..46462dcb7 100644 --- a/packages/app/components/FilterBadge.tsx +++ b/packages/app/components/FilterBadge.tsx @@ -1,7 +1,17 @@ import { RDropdownMenu, RStack } from '@packrat/ui'; import React from 'react'; -const FilterBadge = ({ menuItems, selectedValue, onSelect }) => { +interface FilterBadgeProps { + menuItems: string[]; + selectedValue: string; + onSelect: (value: string) => void; +} + +const FilterBadge = ({ + menuItems = [], + selectedValue = '', + onSelect = () => {}, +}: FilterBadgeProps) => { return ( ((props, ref) => { return (
- {fields.map((field) => ( - - {field.label && } - - ( - (inputRefs.current[field.name] = el), - }} - /> - )} - /> - - - - - ))} + {fields && + Array.isArray(fields) && + fields.map((field) => ( + + {field.label && } + + ( + (inputRefs.current[field.name] = el), + }} + /> + )} + /> + + + + + ))} @@ -145,4 +148,6 @@ const ReusableForm = forwardRef((props, ref) => { ); }); +ReusableForm.displayName = 'ReusableForm'; + export default ReusableForm; diff --git a/packages/ui/src/index.tsx b/packages/ui/src/index.tsx index 75af69e4a..3ea1860db 100644 --- a/packages/ui/src/index.tsx +++ b/packages/ui/src/index.tsx @@ -1,3 +1,5 @@ +// Component Imports +// - Basic components and UI elements import RButton from './RButton'; import RCard from './RCard'; import RCheckbox from './RCheckbox'; @@ -14,9 +16,9 @@ import RImage from './RImage'; import RInput from './RInput'; import RLabel from './RLabel'; import RLink from './RLink'; +import RParagraph from './Rparagraph'; import RRadio from './RRadio'; import RScrollView from './RScrollview'; - import RSelect from './RSelect'; import RSeparator from './RSeparator'; import RSpinner from './RSpinner'; @@ -25,27 +27,31 @@ import RSwitch from './RSwitch'; import RTabs from './RTabs'; import RText from './RText'; import RTooltip from './RTooltip'; -import RParagraph from './Rparagraph'; import SizableText from './SizableText'; import XStack from './XStack'; import YStack from './YStack'; -export { DropdownMenu, RDropdownMenu } from './ZDropdown'; -export { Container } from './Container'; -export { MainContentWeb } from './MainContentWeb'; -export { ContextMenu, RContextMenu } from './RContextMenu'; -export { DropdownComponent } from './Dropdown'; + +// Dropdown and Menu Components +// - Specific dropdown and context menu utilities export { - CascadedDropdownComponent, ActionsDropdownComponent, + CascadedDropdownComponent, } from './CascadedDropdown'; -// export { DropdownMenu, ExampleDropdown } from './RDropdown/DropdownBase'; -export { RSkeleton } from './RSkeleton'; - -export { LoadingPlaceholder } from './LoadingPlaceholder'; +export { DropdownComponent } from './Dropdown'; +export { ContextMenu, RContextMenu } from './RContextMenu'; +export { DropdownMenu, RDropdownMenu } from './ZDropdown'; +// Specialized Components +// - Custom or more complex UI components +export { Container } from './Container'; export { EditableText } from './EditableText'; +export { LoadingPlaceholder } from './LoadingPlaceholder'; +export { MainContentWeb } from './MainContentWeb'; +export { RSkeleton } from './RSkeleton'; export { ThreeDotsMenu } from './ThreeDotsMenu'; +// Re-Exports +// - Components re-exported for organization or external access export { RButton, RCard, @@ -77,48 +83,43 @@ export { SizableText, XStack, YStack, - // ZDropdown, }; -export * from './InputText'; -export * from './form'; -export * from './card'; -export * from './Details'; -export { View } from 'tamagui'; +// External Packages and Libraries +// - Third-party or framework-specific imports +export * from '@tamagui/toast'; +export { ListItem as RListItem, View } from 'tamagui'; export { config } from './tamagui.config'; -// export * from 'tamagui'; -export { ListItem as RListItem } from 'tamagui'; -export * from '@tamagui/toast'; -export * from './EmptyState'; +// Utility Modules +// - Shared utilities and helper modules +export * from './alert'; export * from './Bento'; +export * from './card'; +export * from './Chip'; export * from './DateRangePicker'; +export * from './Details'; export * from './dialog'; -export * from './ImageGallery'; +export * from './EmptyState'; +export * from './ErrorBoundary'; +export * from './form'; +export * from './FullScreen'; export * from './Image'; +export * from './ImageGallery'; +export * from './InputText'; +export * from './ItemPickerOverlay'; export * from './list'; export * from './modal'; -export * from './toast'; -export * from './alert'; +export * from './Pagination'; export * from './RCard'; -export * from './ItemPickerOverlay'; export * from './RImage'; export * from './RInput'; +export * from './Rparagraph'; export * from './RScrollview'; export * from './RStack'; export * from './RTabs'; export * from './RText'; -export * from './Rparagraph'; -export * from './FullScreen'; export * from './SizableText'; +export * from './toast'; export * from './XStack'; export * from './YStack'; -export * from './Pagination'; -// Future components -// export * from './RCheckbox'; -// export * from './RSelect'; -// export * from './RSlider'; -// export * from './RToast'; -// export * from './RTooltip'; - -export * from './ErrorBoundary';