diff --git a/app/page.tsx b/app/page.tsx index 2008ab9bc..1de1ed24c 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -2,7 +2,7 @@ import Error from 'app/error'; import Footer from 'components/layout/footer'; import { Navbar } from 'components/layout/navbar'; import Search from 'components/layout/navbar/search'; -import PriceBoxes from 'components/price-boxes'; +import { PriceBox } from 'components/price-box'; import { getCollectionProducts } from 'lib/shopify'; import Image from 'next/image'; @@ -24,28 +24,25 @@ export default async function HomePage() { <>
-
+
{products[0].featuredImage.altText
-
+

{products[0].title}

Read more - +
+ + +
diff --git a/components/price-box.tsx b/components/price-box.tsx new file mode 100644 index 000000000..337bb7a2f --- /dev/null +++ b/components/price-box.tsx @@ -0,0 +1,13 @@ +interface PriceBoxProps { + title: string; + price: number; +} + +export const PriceBox = ({ title, price }: PriceBoxProps) => { + return ( +
+

{title}

+

£{price.toLocaleString('en-GB')}

+
+ ); +}; diff --git a/components/price-boxes.tsx b/components/price-boxes.tsx deleted file mode 100644 index 946214a80..000000000 --- a/components/price-boxes.tsx +++ /dev/null @@ -1,29 +0,0 @@ -interface PriceBoxesProps { - products: { title: string; price: string }[]; - totalWidth: number; -} - -const PriceBoxes = ({ products, totalWidth }: PriceBoxesProps) => { - return ( -
- {products.map(({ title, price }) => ( - - ))} -
- ); -}; -export default PriceBoxes; - -interface PriceBoxProps { - title: string; - price: string; -} - -const PriceBox = ({ title, price }: PriceBoxProps) => { - return ( -
-

{title}

-

{price}

-
- ); -};