-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1360 from andrew-bierman/enhance-createTripScreen
Enhance Create Trip Screen
- Loading branch information
Showing
24 changed files
with
408 additions
and
548 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,33 @@ | ||
import React from 'react'; | ||
import { RStack as OriginalRStack, RText as OriginalRText } from '@packrat/ui'; | ||
import { FontAwesome5 } from '@expo/vector-icons'; | ||
import React, { useState } from 'react'; | ||
import { | ||
RStack as OriginalRStack, | ||
RText as OriginalRText, | ||
View, | ||
XStack, | ||
} from '@packrat/ui'; | ||
import { AddPackContainer } from '../../modules/pack/widgets/AddPackContainer'; | ||
import useTheme from '../../hooks/useTheme'; | ||
import PackContainer from '../../modules/pack/widgets/PackContainer'; | ||
import { usePackId } from 'app/modules/pack'; | ||
import { useFetchSinglePack, usePackId } from 'app/modules/pack'; | ||
import { LayoutCard } from 'app/components/LayoutCard'; | ||
|
||
const RStack: any = OriginalRStack; | ||
const RText: any = OriginalRText; | ||
|
||
export const GearList = () => { | ||
const { currentTheme } = useTheme(); | ||
const [_, setPackIdParam] = usePackId(); | ||
const [isOpen, setIsOpen] = useState(false); | ||
const [packId, setPackIdParam] = usePackId(); | ||
const { data: currentPack } = useFetchSinglePack(packId); | ||
|
||
return ( | ||
<RStack | ||
alignSelf="center" | ||
$sm={{ | ||
borderRadius: 6, | ||
width: '100%', | ||
}} | ||
$gtSm={{ | ||
borderRadius: 12, | ||
width: '90%', | ||
}} | ||
style={{ | ||
flexDirection: 'column', | ||
backgroundColor: currentTheme.colors.card, | ||
gap: 15, | ||
marginVertical: 10, | ||
alignItems: 'center', | ||
padding: 30, | ||
}} | ||
> | ||
<RStack> | ||
<RStack | ||
style={{ | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
gap: 10, | ||
}} | ||
> | ||
<FontAwesome5 | ||
name="clipboard-check" | ||
size={20} | ||
color={currentTheme.colors.cardIconColor} | ||
/> | ||
<RText | ||
style={{ | ||
color: currentTheme.colors.text, | ||
fontSize: currentTheme.font.size, | ||
paddingTop: 12, | ||
paddingBottom: 12, | ||
fontWeight: 600, | ||
}} | ||
fontFamily="$body" | ||
> | ||
Gear List | ||
</RText> | ||
</RStack> | ||
</RStack> | ||
|
||
<AddPackContainer onSuccess={setPackIdParam} isCreatingTrip={true} /> | ||
<PackContainer /> | ||
</RStack> | ||
<> | ||
<LayoutCard title="Your Pack"> | ||
<XStack style={{ alignItems: 'center' }}> | ||
<View style={{ flex: 1 }}> | ||
<PackContainer /> | ||
</View> | ||
<AddPackContainer onSuccess={setPackIdParam} isCreatingTrip={true} /> | ||
</XStack> | ||
</LayoutCard> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.