Skip to content

Commit

Permalink
fixed after rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlotteLaw committed Apr 21, 2024
1 parent d3e08ac commit 46a8b03
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 129 deletions.
4 changes: 0 additions & 4 deletions src/app/orderConfirmationPickUp/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,10 @@ export default function OrderConfirmationPickUp() {
const searchParams = useSearchParams();
const orderIDFromSearch = searchParams.get('orderID');


useEffect(() => {
async function fetchProducts() {

const cartItems = (await fetchCartItemsWithQuantityByID(
orderIDFromSearch,

)) as Product[];
setCart(cartItems);
}
Expand Down Expand Up @@ -161,7 +158,6 @@ export default function OrderConfirmationPickUp() {
</ShippingDetailsDiv>
</RightColumnDiv>
</BottomColumnDiv>

</PageDiv>
</CenterDiv>
</div>
Expand Down
5 changes: 1 addition & 4 deletions src/app/orderConfirmationPickUp/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,12 @@ export const Label = styled.p`
margin-top: 20px;
`;


export const ImageDiv = styled.p`
width: 150px;
height: 150px;
align-items: center;
justify-content: center;
display: flex;
`;

export const LabelBox = styled.div`
Expand Down Expand Up @@ -244,7 +242,6 @@ export const WhiteBackgroundDiv = styled.div`
box-shadow: 0px 4px 7px 0px rgba(0, 0, 0, 0.1);
`;


export const Wrapper2 = styled.div`
display: flex;
flex-direction: col;
Expand Down Expand Up @@ -331,4 +328,4 @@ export const CenterDiv = styled.div`
position: relative;
width: 100%;
padding: 20px;
`;
`;
13 changes: 1 addition & 12 deletions src/app/orderHistory/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,9 @@ function OrderHistory() {
<NavBarMovedUP />
<OutterBox>
<BackButtonDiv>
<BackButton destination="./profileScreen" />
<<<<<<< HEAD
<<<<<<< HEAD
<div style={{ marginTop: '40px', marginBottom: '20px' }}>
<Heading1>Order History</Heading1>
</div>
=======
<BackButton destination="./profileScreen" />
</BackButtonDiv>
<Heading2>Order History</Heading2>
>>>>>>> b287da7 (temp)
=======
</BackButtonDiv>
<Heading2>Order History</Heading2>
>>>>>>> b287da70273f0befb5c5c6b437883b203f43b605
<OrderHistoryContainer>
{orderIds.length > 0 ? (
orderIds.map((orderId: number) => (
Expand Down
14 changes: 1 addition & 13 deletions src/app/orderHistory/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,12 @@ export const OrderHistoryContainer = styled.div`
flex-direction: column;
align-items: center;
border-radius: 10px;
<<<<<<< HEAD
background: ${COLORS.white};
box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.2);
width: 800px; // Width of the outer box
height: auto;
margin-top: 10px;
padding-top: 40px;
=======
background: var(--White, #fff);
background-color: pink;
box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.2);
width: 800px; // Width of the outer box
height: 700px;
overflow: scroll;
margin-top: 20px;
margin-bottom: 50px;
padding: 0; // Ensure there's no padding pushing the internal boxes inward
>>>>>>> b287da7 (temp)
padding-top: 10px;
`;

export const OrderHistoryBox = styled.div`
Expand Down
47 changes: 26 additions & 21 deletions src/app/orderPage/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

import { useState, useEffect } from 'react';
import { Check, X, Send } from 'react-feather';
import { Body1, Body2Light, Heading3Bold, Heading4Bold, Body2, Heading2, Body1Bold } from '@/styles/fonts';
import {
Body1,
Body2Light,
Heading3Bold,
Heading4Bold,
Body3,
Body2,
Heading2,
Body1Bold,
} from '@/styles/fonts';
import { useSearchParams } from 'next/navigation';
import BackButton from '../../components/BackButton/BackButton';

Expand Down Expand Up @@ -87,7 +96,7 @@ export default function OrderPage() {
}
fetchProducts();
}, []);

const status = order?.order_status?.toLowerCase() || 'default';

return (
Expand All @@ -101,24 +110,24 @@ export default function OrderPage() {
<BottomColumnDiv>
<LeftColumnDiv>
<TextDiv>
<Heading2>{formatDate(order?.created_at)}</Heading2>
<Heading2>Order No. {order?.id}</Heading2>
</TextDiv>
<OutterFavoriteDiv>
<TextDiv1>
<Heading4Bold>Order No</Heading4Bold>
</TextDiv1>
<TextDiv>
<Body1>Order Date: {order?.id}</Body1>
</TextDiv>
<ScrollDiv>
{orders.map(product => (
<FavoriteDiv key={product.id}>
<ImageDiv>
<img
src={product.photo}
alt={product.name}
width={150}
height={150}
style={{ marginTop: '0' }}
/>
</ImageDiv>
{orders.map(product => (
<FavoriteDiv key={product.id}>
<ImageDiv>
<img
src={product.photo}
alt={product.name}
width={150}
height={150}
style={{ marginTop: '0' }}
/>
</ImageDiv>

<LabelBox>
<Body1Bold>{product.name}</Body1Bold>
Expand Down Expand Up @@ -162,12 +171,8 @@ export default function OrderPage() {
</ShippingDetailsDiv>
</RightColumnDiv>
</BottomColumnDiv>

</PageDiv>
</CenterDiv>
</div>
);
}



32 changes: 17 additions & 15 deletions src/app/orderPage/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import { Heart } from 'react-feather';
import NavBar from '../../components/NavBarFolder/NavBar';

export const FavoriteDiv = styled.div`
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
margin-bottom: 50px;
margin-top: 30px;
margin-right: 20px;
margin-left: 40px;
gap: 70px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
margin-bottom: 50px;
margin-top: 30px;
margin-right: 20px;
margin-left: 40px;
gap: 70px;
`;

export const BottomColumnDiv = styled.div`
Expand All @@ -25,7 +25,7 @@ export const BottomColumnDiv = styled.div`
width: 100%;
margin-left: 10px;
margin-bottom: 30px;
gap: 10px;
gap: 20px;
`;

export const ScrollDiv = styled.div`
Expand All @@ -48,10 +48,10 @@ export const LabelBox = styled.div`
height: 100%;
`;

export const OutterFavoriteDiv = styled.div`
export const OutterFavoriteDiv = styled.div`
display: flex;
flex-direction: column;
align-items: center;
align-items: left;
border-radius: 10px;
background: var(--White, #fff);
box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.2);
Expand All @@ -60,6 +60,7 @@ export const OutterFavoriteDiv = styled.div`
overflow: scroll;
margin-top: 20px;
padding-top: 15px;
margin-left: 60px;
`;

export const BackDiv = styled.button`
Expand Down Expand Up @@ -185,7 +186,6 @@ export const StatusButton = styled.button<{ status: string }>`
}};
`;


export const Body1Bold = styled.p`
font-size: 16px;
font-style: normal;
Expand Down Expand Up @@ -242,12 +242,14 @@ export const RightColumnDiv = styled.div`
align-items: start;
margin-left: 10px;
width: 100%;
margin-top: 8px;
`;

export const TextDiv1 = styled.div`
display: flex;
flex-direction: row;
margin-top: 20px;
background-color: pink;
`;

export const TextDiv = styled.div`
Expand All @@ -264,4 +266,4 @@ export const LeftColumnDiv = styled.div`
justify-content: space-evenly;
align-items: space-evenly;
width: 100%;
`;
`;
11 changes: 4 additions & 7 deletions src/app/profileScreen/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,9 @@ function FavoriteSection(props: {
style={{ width: '100px', height: '100px' }}
/>
<ProductNameDiv>
<Body1Bold>
{favorite.name} </Body1Bold>
<Spacing />
<Body2Light>
Category: {favorite.category}
</Body2Light>
<Body1Bold>{favorite.name} </Body1Bold>
<Spacing />
<Body2Light>Category: {favorite.category}</Body2Light>
</ProductNameDiv>
<TransparentButton
onClick={() => clickFunctions({ fav: favorite })}
Expand Down Expand Up @@ -436,7 +433,7 @@ export default function Profile() {
<OrderHistorySection Orders={Orders} />
</MostRecentOrder>
<MostRecentOrder>
<LogoutSection />
<LogoutSection />
<FavoriteSection Favorites={Favorites} setFavorites={setFavorites} />
</MostRecentOrder>
</ColumnDiv>
Expand Down
12 changes: 0 additions & 12 deletions src/app/profileScreen/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,10 @@ export const LogOutButton = styled.button`
font-weight: 600;
line-height: normal;
border: transparent;
<<<<<<< HEAD
<<<<<<< HEAD
border-radius: 5px;
width: 405px;
height: 50px;
=======
=======
>>>>>>> b287da70273f0befb5c5c6b437883b203f43b605
border-radius: 10px;
width: 500px;
height: 55px;
margin-top: 40px;
<<<<<<< HEAD
>>>>>>> b287da7 (temp)
=======
>>>>>>> b287da70273f0befb5c5c6b437883b203f43b605
`;
/* transform: translateY(200px); */

Expand Down
18 changes: 1 addition & 17 deletions src/components/BackButton/BackButton.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
<<<<<<< HEAD
<<<<<<< HEAD
import { Body1Bold } from '@/styles/fonts';
=======
import { Body1, Body2Bold } from '@/styles/fonts';
>>>>>>> b287da7 (temp)
=======
import { Body1, Body2Bold } from '@/styles/fonts';
>>>>>>> b287da70273f0befb5c5c6b437883b203f43b605
import { Body1Bold, Body1, Body2Bold } from '@/styles/fonts';
import { BackLink, ArrowLeftIcon } from './styles';

export default function BackButton(props: { destination: string }) {
const { destination } = props;
return (
<BackLink href={destination}>
<ArrowLeftIcon />
<<<<<<< HEAD
<<<<<<< HEAD
<Body1Bold>Back</Body1Bold>
=======
<Body2Bold>Back</Body2Bold>
>>>>>>> b287da7 (temp)
=======
<Body2Bold>Back</Body2Bold>
>>>>>>> b287da70273f0befb5c5c6b437883b203f43b605
</BackLink>
);
}
19 changes: 0 additions & 19 deletions src/components/BackButton/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,13 @@ export const BackLink = styled(Link)`
align-items: center;
justify-content: space-between;
color: ${COLORS.black};
<<<<<<< HEAD
<<<<<<< HEAD
width: 75px;
=======
width: 60px;
>>>>>>> b287da7 (temp)
=======
width: 60px;
>>>>>>> b287da70273f0befb5c5c6b437883b203f43b605
&:hover {
text-decoration: underline;
}
`;

export const ArrowLeftIcon = styled(ArrowLeft)`
<<<<<<< HEAD
<<<<<<< HEAD
width: 20px;
height: 20px;
=======
width: 18px;
height: 18px;
>>>>>>> b287da7 (temp)
=======
width: 18px;
height: 18px;
>>>>>>> b287da70273f0befb5c5c6b437883b203f43b605
`;
4 changes: 2 additions & 2 deletions src/components/FooterFolder/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
export default function Footer({ ...rest }) {
const router = useRouter();
return (
<main {...rest}>

<Wrapper>
<ContactDiv>
<Heading>Contact Us</Heading>
Expand Down Expand Up @@ -122,6 +122,6 @@ export default function Footer({ ...rest }) {
}}
/>
</Wrapper>
</main>

);
}
Loading

0 comments on commit 46a8b03

Please sign in to comment.