Skip to content

Commit

Permalink
Reincorporated profile and cart buttons back into storefront
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanAuyeung committed Oct 15, 2023
1 parent 82ba7fc commit e059fdd
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
10 changes: 9 additions & 1 deletion src/app/storefront/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import React, { useState } from 'react';

import { GlobalStyle, ButtonsContainer } from './styles';
import Link from 'next/link';
import { GlobalStyle, ButtonsContainer, IconButtons } from './styles';
import ProductButtons from './productButtons';

interface Product {
Expand Down Expand Up @@ -42,6 +43,13 @@ export default function App() {

return (
<main>
<GlobalStyle />
<IconButtons>
<Link href="/checkout">Cart</Link>
</IconButtons>
<IconButtons>
<Link href="/profileScreen">Profile</Link>
</IconButtons>
<GlobalStyle />
<ButtonsContainer>
{buttons.map(type => (
Expand Down
6 changes: 4 additions & 2 deletions src/app/storefront/productButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function ProductButtons(props: {
) {
setIsClicked(!IsClicked);
const category = e.currentTarget.value;
console.log(category);
// console.log(category);

if (category !== 'All') {
const products = await filterProduct(category);
Expand All @@ -50,7 +50,9 @@ export default function ProductButtons(props: {
isClicked={IsClicked}
key={key}
value={value}
onClick={e => applyFilter(e)}
onClick={(e: React.MouseEvent<HTMLButtonElement, MouseEvent>) =>
applyFilter(e)
}
/>
<Label isClicked={IsClicked}>{content}</Label>
</IndividualContainer>
Expand Down
17 changes: 17 additions & 0 deletions src/app/storefront/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,20 @@ export const ButtonsContainer = styled.div`
flex-direction: row;
align-items: center;
`;
export const IconButtons = styled.button`
margin-top: 30px;
margin-right: 25px;
color: white;
text-align: center;
font-family: sans-serif;
font-size: 15px;
font-style: normal;
font-weight: normal;
line-height: normal;
width: 70px;
height: 40px;
background: black;
border: transparent;
border-radius: 5px;
float: right;
`;

0 comments on commit e059fdd

Please sign in to comment.