Skip to content

Commit

Permalink
Merge branch 'main' into feat/offer-cumulative-codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNumericite authored Nov 25, 2024
2 parents 506cf78 + fef6cba commit 45d7e5f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 26 deletions.
7 changes: 7 additions & 0 deletions webapp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [0.70.26](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.70.25...v0.70.26) (2024-11-25)

### Bug Fixes

- router push dashboard before ([4651d31](https://github.com/SocialGouv/carte-jeune-engage/commit/4651d31d7a442a549565c2756f3d07bcd5169892))
* wallet history button disappear when wallet is empty ([f0477c4](https://github.com/SocialGouv/carte-jeune-engage/commit/f0477c44279b5ddb5d85deff09d5eb095cf97574))

## [0.70.25](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.70.24...v0.70.25) (2024-11-22)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webapp",
"version": "0.70.25",
"version": "0.70.26",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
52 changes: 27 additions & 25 deletions webapp/src/pages/dashboard/wallet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ export default function Wallet() {
(a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime()
);

const isWalletEmpty = !walletOffers || !walletOffers.length;

return (
<WalletWrapper>
{walletOffers && walletOffers.length > 0 ? (
{!isWalletEmpty ? (
<>
<Flex flexDir="column" gap={6}>
{walletOffers.map((walletOffer, index) => (
Expand All @@ -84,36 +86,36 @@ export default function Wallet() {
</Box>
))}
</Flex>
<Box px={8}>
<Divider mt={16} borderColor="cje-gray.100" />
<Link
as={NextLink}
href="/dashboard/account/history"
_hover={{ textDecoration: "none" }}
passHref
>
<Flex alignItems="center" justifyContent="space-between" py={5}>
<Flex alignItems="center" gap={4}>
<Icon
as={HiReceiptRefund}
w={5}
h={5}
mt={0.5}
color="blackLight"
/>
<Text fontWeight={500}>Historique des réductions</Text>
</Flex>
<Icon as={HiChevronRight} w={6} h={6} />
</Flex>
</Link>
<Divider borderColor="cje-gray.100" />
</Box>
</>
) : (
<Box px={8}>
<CouponCard mode="wallet" />
</Box>
)}
<Box px={8} my={8}>
<Divider borderColor="cje-gray.100" />
<Link
as={NextLink}
href="/dashboard/account/history"
_hover={{ textDecoration: "none" }}
passHref
>
<Flex alignItems="center" justifyContent="space-between" py={5}>
<Flex alignItems="center" gap={4}>
<Icon
as={HiReceiptRefund}
w={5}
h={5}
mt={0.5}
color="blackLight"
/>
<Text fontWeight={500}>Historique des réductions</Text>
</Flex>
<Icon as={HiChevronRight} w={6} h={6} />
</Flex>
</Link>
<Divider borderColor="cje-gray.100" />
</Box>
<Box px={8}>
<Center
flexDir="column"
Expand Down

0 comments on commit 45d7e5f

Please sign in to comment.