diff --git a/src/app/[productId]/page.tsx b/src/app/[productId]/page.tsx index e92d1210..f93bd3d3 100644 --- a/src/app/[productId]/page.tsx +++ b/src/app/[productId]/page.tsx @@ -1,6 +1,8 @@ 'use client'; import { useEffect, useState } from 'react'; +import { convertButtonNumberToCategory } from '@/api/supabase/queries/button_queries'; +import { Body1, Heading1, Body2Light } from '@/styles/fonts'; import { fetchProductByID } from '../../api/supabase/queries/product_queries'; import BackButton from '../../components/BackButton/BackButton'; import 'react-toastify/dist/ReactToastify.css'; @@ -28,6 +30,9 @@ export default function ItemDisplay({ async function fetchProducts() { try { const response = await fetchProductByID(params.productId); + response.category = await convertButtonNumberToCategory( + response.category, + ); if (response) { setItem(response); } @@ -48,24 +53,31 @@ export default function ItemDisplay({ limit={1} hideProgressBar /> - +
+ +
+ {Item?.name} -

{Item?.name}

-

+ {Item?.name} + {Item?.category} -

+ -

Product ID: {Item?.id}

-

Product Details:

-

{Item?.description}

+ + Product ID: {Item?.id} + + + Product Details: + + {Item?.description}
diff --git a/src/app/[productId]/styles.ts b/src/app/[productId]/styles.ts index ccd5dcf7..e96cbb27 100644 --- a/src/app/[productId]/styles.ts +++ b/src/app/[productId]/styles.ts @@ -15,24 +15,29 @@ export const BackButton = styled.button` export const DescriptionContainer = styled.div` display: flex; - margin: 50px; + margin-left: 50px; + margin-right: 50px; width: 1440px; height: 400px; `; export const ImageContainer = styled.div` margin: 50px; - width: 350px; - height: 350 px; + width: 500px; + height: 500px; + display: flex; + align-items: center; + justify-content: center; flex-shrink: 0; margin-left: 200px; - margin-right: 200px; + background-color: ${COLORS.lightGrey}; `; export const TextContainer = styled.div` margin-left: 70px; width: 440px; height: 350px; + margin-top: 50px; `; export const ButtonsWrapper = styled.div` @@ -83,7 +88,7 @@ export const AddToCartButton = styled.button` export const ToastPopUP = styled(ToastContainer)` position: fixed; z-index: 100; - transform: translatey(130px); + transform: translatey(90px); `; export const Fullscreen = styled.div` diff --git a/src/app/cart/page.tsx b/src/app/cart/page.tsx index fb0c230e..55db4d97 100644 --- a/src/app/cart/page.tsx +++ b/src/app/cart/page.tsx @@ -50,39 +50,39 @@ export default function OrderPage() { }; return ( -
+ - - +
- - - Cart - - {cart.map(cartItem => ( - - ))} - - - - - checkDelivery()} - disabled={numberOfItems === 0} - > - Check Out - - - - -
+
+ + + + Cart + + {cart.map(cartItem => ( + + ))} + + + + + checkDelivery()} + disabled={numberOfItems === 0} + > + Check Out + + + + ); } diff --git a/src/app/cart/styles.tsx b/src/app/cart/styles.tsx index 9df4f0a9..b9cee91a 100644 --- a/src/app/cart/styles.tsx +++ b/src/app/cart/styles.tsx @@ -33,6 +33,7 @@ export const CartItemsDiv = styled.div` width: 750px; overflow: auto; gap: 32px; + margin-top: 20px; `; export const ImageDiv = styled.div` @@ -130,7 +131,9 @@ export const ContentDiv = styled.div` display: flex; flex-direction: row; justify-content: space-between; - gap: 32px; + gap: 100px; + padding-left: 50px; + background-color: ${COLORS.offWhite}; `; export const BackButtonDiv1 = styled.div` @@ -242,17 +245,18 @@ export const PShiftLeft = styled.p` `; export const PageDiv = styled.div` - height: 100%; + height: auto; + width: 100%; display: flex; flex-direction: column; - padding: 32px; - gap: 32px; + background-color: ${COLORS.offWhite}; `; export const LeftColumnDiv = styled.div` flex: 1; padding-right: 20px; + margin-top: 20px; `; export const InformationText = styled.div` @@ -334,6 +338,7 @@ export const OrderContainer = styled.div` export const RightColumnDiv = styled.div` flex: 1; + margin-top: 30px; padding-left: 20px; `;