-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7c61f9
commit d43d3be
Showing
4 changed files
with
109 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,30 @@ | ||
export default function Storefront() { | ||
'use client'; | ||
|
||
import React from 'react'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { faShoppingCart, faUser } from '@fortawesome/free-solid-svg-icons'; | ||
import { GlobalStyle, Button } from './styles'; | ||
|
||
function handleCheckoutClick() { | ||
window.location.href = '/checkout'; | ||
} | ||
|
||
function handleProfileClick() { | ||
window.location.href = '/profileScreen'; | ||
} | ||
|
||
export default function App() { | ||
return ( | ||
<main> | ||
<div>storefront</div> | ||
<GlobalStyle /> | ||
<Button onClick={handleCheckoutClick}> | ||
<FontAwesomeIcon icon={faShoppingCart} /> | ||
<div>Cart</div> | ||
</Button> | ||
<Button onClick={handleProfileClick}> | ||
<FontAwesomeIcon icon={faUser} /> | ||
<div>Profile</div> | ||
</Button> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import styled, { createGlobalStyle } from 'styled-components'; | ||
|
||
export const GlobalStyle = createGlobalStyle` | ||
body { | ||
background:white; | ||
} | ||
`; | ||
|
||
export const Button = styled.button` | ||
margin: 10px; | ||
color: black; | ||
text-align: center; | ||
font-family: sans-serif; | ||
font-size: 15px; | ||
font-style: normal; | ||
font-weight: normal; | ||
line-height: normal; | ||
width: 50px; | ||
height: 50px; | ||
background: transparent; | ||
border: transparent; | ||
float: right; | ||
`; |