Skip to content

Commit

Permalink
Merge pull request #1267 from andrew-bierman/fix-item-visibility-crea…
Browse files Browse the repository at this point in the history
…teTrip

fix item visibilty in create trip
  • Loading branch information
taronaleksanian authored Sep 26, 2024
2 parents f526655 + 68e1834 commit 8d15fb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ export const TableContainer = ({
weight={totalWeight}
unit={weightUnit}
/>
<WeightUnitDropdown
value={weightUnit}
onChange={(itemValue: string) => setWeightUnit(itemValue as any)}
/>
</>
) : (
<RText style={styles.noItemsText}>Add your First Item</RText>
)}
<WeightUnitDropdown
value={weightUnit}
onChange={(itemValue: string) => setWeightUnit(itemValue as any)}
/>
</View>
);
};
15 changes: 2 additions & 13 deletions packages/app/modules/pack/widgets/PackContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -74,19 +75,7 @@ export default function PackContainer({ isCreatingTrip = false }) {
/>
{currentPackId && (
<>
<AddItemModal
currentPackId={currentPackId}
currentPack={currentPack}
isAddItemModalOpen={isAddItemModalOpen}
setIsAddItemModalOpen={setIsAddItemModalOpen}
/>
<TableContainer
key={`table - ${currentPackId}`}
currentPack={currentPack}
selectedPack={currentPackId}
refetch={refetch}
setRefetch={setRefetch}
/>
<TableContainerComponent currentPack={currentPack} />
</>
)}
</>
Expand Down

0 comments on commit 8d15fb6

Please sign in to comment.