Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/components/wallet-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export function WalletCardBackgroundImage({
<img
src={src}
alt={alt}
loading="lazy"
className={cn('h-full w-full object-cover', className)}
/>
</WalletCardOverlay>
Expand Down
2 changes: 2 additions & 0 deletions app/features/gift-cards/use-discover-cards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export const GIFT_CARDS: GiftCardInfo[] = [
},
];

export const GIFT_CARD_IMAGES = GIFT_CARDS.map((card) => card.image);

/**
* Returns the gift card image for a given URL, if one exists.
*/
Expand Down
10 changes: 9 additions & 1 deletion app/routes/_protected.gift-cards.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import { Outlet } from 'react-router';
import { type LinksFunction, Outlet } from 'react-router';
import '~/features/gift-cards/transitions.css';
import { GIFT_CARD_IMAGES } from '~/features/gift-cards/use-discover-cards';

export const links: LinksFunction = () =>
GIFT_CARD_IMAGES.map((imageUrl) => ({
rel: 'preload',
href: imageUrl,
as: 'image',
}));

export default function GiftCardsLayout() {
return <Outlet />;
Expand Down