Skip to content

Commit

Permalink
fixing up the featured products
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsbajorics committed May 6, 2024
1 parent 358d72b commit 3374e64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion app/components/Components.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,6 @@ export const ProductCard = ({
return (
<Link
key={id}
className='recommended-product'
to={`/products/${handle}`}
style={{
textDecoration: 'none',
Expand Down
16 changes: 10 additions & 6 deletions app/components/RecommendedProducts.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { Suspense } from 'react'
import { ProductCard, TypographyTitle } from './Components'
import {
Column,
ProductCard,
Row,
TypographyTitle,
} from './Components'
import { Await, useLoaderData } from '@remix-run/react'
import { RecommendedProductsGrid } from './Layout'

Expand All @@ -11,11 +16,11 @@ import { RecommendedProductsGrid } from './Layout'
export function RecommendedProducts() {
const { recommendedProducts } = useLoaderData()
return (
<div className='recommended-products'>
<Column centerH>
<TypographyTitle level={2}>
Featured Products
</TypographyTitle>
<RecommendedProductsGrid>
<Row scrollable>
{recommendedProducts.map((product, i) => (
<ProductCard
key={product.id}
Expand All @@ -27,8 +32,7 @@ export function RecommendedProducts() {
backgroundColorIndex={i}
/>
))}
</RecommendedProductsGrid>
<br />
</div>
</Row>
</Column>
)
}

0 comments on commit 3374e64

Please sign in to comment.