File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { shapes } from "../../data/shapes";
1111import Loader from "react-loader-spinner" ;
1212
1313// ShapeListing
14- import { ShapeList } from '..' ;
14+ import { ShapeList , Header } from '..' ;
1515
1616const App = ( props ) => {
1717 const [ data , setData ] = useState ( [ ] ) ;
@@ -42,6 +42,7 @@ const App = (props) => {
4242
4343 return (
4444 < >
45+ < Header { ...props } />
4546 { loading ? (
4647 < Loader
4748 style = { { margin : '20% auto auto 42%' } }
Original file line number Diff line number Diff line change 11import React from 'react' ;
22
3+ import Button from 'react-bootstrap/Button' ;
4+
35// Header
46import { Header } from '..'
57
8+ // icon
9+ import { BsLightning } from "react-icons/bs" ;
10+
11+ // link
12+ import Link from "next/link" ;
13+
614const Landing = ( { setOpen, user, setUser } ) => {
715
816 return (
917 < div >
1018 < Header setOpen = { setOpen } user = { user } setUser = { setUser } />
1119 < div >
12- < h1 > Try Shape </ h1 >
20+ < h1 > Landing </ h1 >
1321 </ div >
22+ < Link href = "/app" >
23+ < a >
24+ < Button >
25+ < div >
26+ Try Now!
27+ < BsLightning />
28+ </ div >
29+ </ Button >
30+ </ a >
31+ </ Link >
1432 </ div >
1533 )
1634} ;
Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+ import { App } from "../components" ;
3+
4+ const Container = ( props ) => {
5+ return < App { ...props } /> ;
6+ } ;
7+
8+ export default Container ;
Original file line number Diff line number Diff line change @@ -2,10 +2,15 @@ import React from "react";
22import { App , Landing } from "../components" ;
33
44const index = ( props ) => {
5+ const { user } = props ;
6+ console . log ( user ) ;
57 return (
68 < main >
7- < Landing { ...props } />
8- < App { ...props } />
9+ {
10+ user . length === 0 ?
11+ ( < Landing { ...props } /> ) :
12+ ( < App { ...props } /> )
13+ }
914 </ main >
1015 ) ;
1116} ;
You can’t perform that action at this time.
0 commit comments