Skip to content

Commit

Permalink
Merge branch 'main' of github.com:calblueprint/shanti-project into ke…
Browse files Browse the repository at this point in the history
…vincai/cart_functional
  • Loading branch information
kevinjcai committed Oct 26, 2023
2 parents cece339 + d317c3d commit e93cbc7
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 11 deletions.
Binary file added public/images/Cart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/Profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/ShantiLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/images/profile (1).svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/images/profile blue version-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/app/checkout/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
'use client';

import NavBar from '../../components/NavBar';

export default function Checkout() {
return (
<main>
<NavBar />
<div>Checkout</div>
</main>
);
Expand Down
3 changes: 3 additions & 0 deletions src/app/profileScreen/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import { LogOutButton, GlobalStyle } from './style';

import { signOut } from '../../api/supabase/auth/auth';

import NavBar from '../../components/NavBar';

export default function Profile() {
return (
<main>
<NavBar />
<GlobalStyle />
<LogOutButton onClick={() => signOut()}>Sign Out</LogOutButton>
</main>
Expand Down
13 changes: 2 additions & 11 deletions src/app/storefront/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
'use client';

import React, { useEffect, useState } from 'react';
import Link from 'next/link';
import Storefront from './storefrontItems';
import ProductButtons from './productButtons';

import NavBar from '../../components/NavBar';
import {
GlobalStyle,
ButtonsContainer,
NavButton,
Img,
StickyHeader,
ShopAllText,
} from './styles';
Expand Down Expand Up @@ -67,13 +64,7 @@ export default function App() {
<main>
<GlobalStyle />
<StickyHeader>
<Img />
<NavButton>
<Link href="/checkout">Cart</Link>
</NavButton>
<NavButton>
<Link href="/profileScreen">Profile</Link>
</NavButton>
<NavBar />
<ButtonsContainer>
{buttons.map(type => (
<ProductButtons
Expand Down
3 changes: 3 additions & 0 deletions src/app/storefront/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export const ButtonsContainer = styled.div`
flex-direction: row;
justify-content: center;
align-items: center;
z-index: 5;
transform: translate(0px, -180px);
`;
export const NavButton = styled.button`
margin-top: 30px;
Expand Down
36 changes: 36 additions & 0 deletions src/components/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import Image from 'next/image';

import Link from 'next/link';
import React from 'react';

import { NavBarComp, ButtonsDiv } from '../styles/components';

export default function NavBar() {
return (
<NavBarComp>
<Link href="../storefront">
<Image
src="/images/ShantiLogo.png"
alt="logo pic"
width={125}
height={70}
/>
</Link>

<ButtonsDiv>
<Link href="../profileScreen">
<Image
src="/images/Profile.png"
alt="logo pic"
width={40}
height={40}
/>
</Link>

<Link href="../checkout">
<Image src="/images/Cart.png" alt="logo pic" width={30} height={40} />
</Link>
</ButtonsDiv>
</NavBarComp>
);
}
30 changes: 30 additions & 0 deletions src/styles/components.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
import styled, { createGlobalStyle } from 'styled-components';

const COMPONENTS = {};

export default COMPONENTS;

export const GlobalStyle = createGlobalStyle`
body {
background:white;
}
`;

export const NavBarComp = styled.nav`
display: flex;
flex-direction: row;
justify-content: space-between;
padding-left: 30px;
padding-right: 30px;
height: 200px;
padding-top: 20px;
width: 100%;
background: var(--Light-Periwinkle, #f4f7ff);
box-shadow: 0px 4px 7px 0px rgba(0, 0, 0, 0.1);
`;

export const ButtonsDiv = styled.div`
width: 200px;
display: flex;
flex-direction: row;
justify-content: space-around;
padding-top: 15px;
`;

0 comments on commit e93cbc7

Please sign in to comment.