From db1f23164bd5dacd7e9d5cd8369c21b26a7e148c Mon Sep 17 00:00:00 2001 From: CharlotteLaw Date: Wed, 17 Apr 2024 13:29:24 -0700 Subject: [PATCH] temp --- src/api/supabase/queries/button_queries.ts | 7 ++++-- src/api/supabase/queries/cart_queries.ts | 3 +-- src/app/orderConfirmationPickUp/page.tsx | 28 ++++++++-------------- src/app/orderConfirmationPickUp/styles.ts | 18 ++++++-------- src/app/profileScreen/page.tsx | 4 ++-- src/app/profileScreen/styles.ts | 6 ++--- 6 files changed, 28 insertions(+), 38 deletions(-) diff --git a/src/api/supabase/queries/button_queries.ts b/src/api/supabase/queries/button_queries.ts index e51fd8c1..86c8fcf0 100644 --- a/src/api/supabase/queries/button_queries.ts +++ b/src/api/supabase/queries/button_queries.ts @@ -12,11 +12,14 @@ export async function fetchButtonCategories(): Promise { return buttons; } -export async function convertButtonNumbertoCategory(id: string):Promise{ +export async function convertButtonNumbertoCategory( + id: string, +): Promise { const { data: buttonsCategory, error } = await supabase .from('storefront_buttons') .select('*') - .eq('id', id).single(); + .eq('id', id) + .single(); if (error) { throw new Error(`Error fetching category: ${error.message}`); } diff --git a/src/api/supabase/queries/cart_queries.ts b/src/api/supabase/queries/cart_queries.ts index 4bb60ff1..b7caba98 100644 --- a/src/api/supabase/queries/cart_queries.ts +++ b/src/api/supabase/queries/cart_queries.ts @@ -3,7 +3,7 @@ import supabase from '../createClient'; import { fetchUser } from './user_queries'; import { Product, ProductWithQuantity } from '../../../schema/schema'; import { fetchProductByID } from './product_queries'; -import {convertButtonNumbertoCategory} from "./button_queries"; +import { convertButtonNumbertoCategory } from './button_queries'; // define cart item type export type CartItem = { id: number; @@ -203,7 +203,6 @@ export async function fetchCartItemsWithQuantity(): Promise< category: await convertButtonNumbertoCategory(product.category), }; }); - const fetchedProducts = await Promise.all(productPromises); console.log(fetchedProducts); diff --git a/src/app/orderConfirmationPickUp/page.tsx b/src/app/orderConfirmationPickUp/page.tsx index c87e8692..0b9c928d 100644 --- a/src/app/orderConfirmationPickUp/page.tsx +++ b/src/app/orderConfirmationPickUp/page.tsx @@ -30,7 +30,6 @@ import { ShippingDetailsDiv, ImageDiv, BottomColumnDiv, - Wrapper, LeftColumnDiv, RightColumnDiv, DetailsHeader, @@ -65,7 +64,6 @@ export default function OrderConfirmationPickUp() { function organizePickupTime() { const startTime = pickupTime?.start_time.toLocaleString(); - const endTime = pickupTime?.end_time.toLocaleString(); const date = startTime == null ? ['0', '0', '0'] @@ -87,7 +85,6 @@ export default function OrderConfirmationPickUp() { Your order has been submitted - Order No. {user?.cart_id} @@ -96,15 +93,14 @@ export default function OrderConfirmationPickUp() { {Cart.map(cartItem => ( - {cartItem.name} + {cartItem.name} {cartItem.name} @@ -112,14 +108,12 @@ export default function OrderConfirmationPickUp() { Category: {cartItem.category} - Quantity: {cartItem.quantity} + Quantity: {cartItem.quantity} - ))} - @@ -127,9 +121,7 @@ export default function OrderConfirmationPickUp() { Time Slot {organizePickupTime()} (10:00 am - 12:30 pm) Location - - 3170 23rd Street, San Francisco, CA 94110 - + 3170 23rd Street, San Francisco, CA 94110 diff --git a/src/app/orderConfirmationPickUp/styles.ts b/src/app/orderConfirmationPickUp/styles.ts index a19bc158..d9278f45 100644 --- a/src/app/orderConfirmationPickUp/styles.ts +++ b/src/app/orderConfirmationPickUp/styles.ts @@ -13,7 +13,6 @@ export const FavoriteDiv = styled.div` margin-bottom: 50px; margin-top: 30px; margin-right: 20px; - `; export const OutterFavoriteDiv = styled.div` @@ -27,9 +26,8 @@ export const OutterFavoriteDiv = styled.div` max-height: 100%; margin-top: 20px; margin-right: 60px; - margin-left: 60px; - padding-right: 20px; - padding-left: 10px; + margin-left: 40px; + padding-right: 15px; padding-top: 10px; `; @@ -109,7 +107,6 @@ export const NavBarMovedUP = styled(NavBar)` export const Label = styled.p` margin-top: 20px; - `; export const LabelBox1 = styled.div` @@ -124,7 +121,6 @@ export const LabelBox = styled.div` padding: 20px; gap: 50px; margin-right: 30px; - `; export const HeaderText = styled.h3` @@ -235,7 +231,6 @@ export const RightColumnDiv = styled.div` display: flex; flex-flow: column; align-items: start; - margin-left: 10px; width: 100%; `; @@ -244,7 +239,7 @@ export const BackButtonDiv = styled.div` flex-direction: row; text-align: left; width: 800px; - margin-left: 80px; + margin-left: 60px; margin-bottom: 40px; `; @@ -257,7 +252,6 @@ export const WhiteBackgroundDiv = styled.div` box-shadow: 0px 4px 7px 0px rgba(0, 0, 0, 0.1); `; - export const BottomColumnDiv = styled.div` display: flex; flex-direction: row; @@ -265,6 +259,7 @@ export const BottomColumnDiv = styled.div` justify-content: space-around; width: 100%; margin-left: 20px; + margin-right: 20px; margin-bottom: 30px; gap: 30px; `; @@ -272,7 +267,7 @@ export const BottomColumnDiv = styled.div` export const TextDiv = styled.div` display: flex; flex-direction: row; - margin-left: 60px; + margin-left: 40px; margin-top: 20px; margin-bottom: 20px; `; @@ -291,6 +286,7 @@ export const PageDiv = styled.div` justify-content: flex-start; align-items: flex-start; width: 100%; + margin-bottom: 40px; `; export const ShippingDetailsDiv = styled.div` @@ -300,7 +296,7 @@ export const ShippingDetailsDiv = styled.div` border-radius: 10px; background: var(--White, #fff); box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.2); - width: 467px; + width: 475px; height: auto; max-height: 100%; padding: 36px 34px; diff --git a/src/app/profileScreen/page.tsx b/src/app/profileScreen/page.tsx index 5c3cc6e4..fa969c6a 100644 --- a/src/app/profileScreen/page.tsx +++ b/src/app/profileScreen/page.tsx @@ -332,10 +332,10 @@ function AccountDetailSectionPickUp(props: { user: User }) { Account Details - Email + Email hi - {user?.email} + {user?.email} Name diff --git a/src/app/profileScreen/styles.ts b/src/app/profileScreen/styles.ts index 81d02884..359b817f 100644 --- a/src/app/profileScreen/styles.ts +++ b/src/app/profileScreen/styles.ts @@ -75,8 +75,8 @@ export const LogOutButton = styled.button` line-height: normal; border: transparent; border-radius: 5px; - width: 405px; - height: 70px; + width: 500px; + height: 55px; `; /* transform: translateY(200px); */ @@ -154,7 +154,7 @@ export const LogOutDiv = styled.div` display: flex; justify-content: center; width: 500px; - height: 350px; + height: 100%; `; export const MessageDiv = styled.div`