From 09efd23497b652d7e66aa295594293ff240d5486 Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Wed, 25 Sep 2024 22:43:01 +0530 Subject: [PATCH 1/2] use table container component in pack container --- packages/app/modules/pack/widgets/PackContainer.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/app/modules/pack/widgets/PackContainer.tsx b/packages/app/modules/pack/widgets/PackContainer.tsx index 3c63979de..357fe9af4 100644 --- a/packages/app/modules/pack/widgets/PackContainer.tsx +++ b/packages/app/modules/pack/widgets/PackContainer.tsx @@ -7,6 +7,7 @@ import { usePackId, useUserPacks, TableContainer } from 'app/modules/pack'; import { DropdownComponent } from '@packrat/ui'; import { Spinner } from 'tamagui'; import useTheme from 'app/hooks/useTheme'; +import { TableContainerComponent } from 'app/screens/trip/TripDetailsComponents'; export default function PackContainer({ isCreatingTrip = false }) { const [isAddItemModalOpen, setIsAddItemModalOpen] = useState(false); @@ -80,13 +81,7 @@ export default function PackContainer({ isCreatingTrip = false }) { isAddItemModalOpen={isAddItemModalOpen} setIsAddItemModalOpen={setIsAddItemModalOpen} /> - + )} From 68e183494a9c6a5086263e8f495d5615496d06a8 Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Thu, 26 Sep 2024 19:59:52 +0530 Subject: [PATCH 2/2] remove unitdropdown and add item modal --- .../modules/pack/components/PackTable/TableContainer.tsx | 8 ++++---- packages/app/modules/pack/widgets/PackContainer.tsx | 6 ------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/app/modules/pack/components/PackTable/TableContainer.tsx b/packages/app/modules/pack/components/PackTable/TableContainer.tsx index 60e693bc1..f7b5e0cf2 100644 --- a/packages/app/modules/pack/components/PackTable/TableContainer.tsx +++ b/packages/app/modules/pack/components/PackTable/TableContainer.tsx @@ -136,14 +136,14 @@ export const TableContainer = ({ weight={totalWeight} unit={weightUnit} /> + setWeightUnit(itemValue as any)} + /> ) : ( Add your First Item )} - setWeightUnit(itemValue as any)} - /> ); }; diff --git a/packages/app/modules/pack/widgets/PackContainer.tsx b/packages/app/modules/pack/widgets/PackContainer.tsx index 357fe9af4..9b05319ca 100644 --- a/packages/app/modules/pack/widgets/PackContainer.tsx +++ b/packages/app/modules/pack/widgets/PackContainer.tsx @@ -75,12 +75,6 @@ export default function PackContainer({ isCreatingTrip = false }) { /> {currentPackId && ( <> - )}