File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
2+ import { Link } from "react-router-dom" ;
23
34import INFO from "../../data/user" ;
45
56import "./styles/logo.css" ;
67
78const Logo = ( props ) => {
8- const { width } = props ;
9+ let { width, link } = props ;
10+
11+ if ( link === undefined ) {
12+ link = true ;
13+ }
14+
15+ const imageElement = (
16+ < img src = { INFO . main . logo } alt = "logo" className = "logo" width = { width } />
17+ ) ;
918
1019 return (
1120 < React . Fragment >
12- < img
13- src = { INFO . main . logo }
14- alt = "logo"
15- className = "logo"
16- width = { width }
17- />
21+ { link ? < Link to = "/" > { imageElement } </ Link > : imageElement }
1822 </ React . Fragment >
1923 ) ;
2024} ;
Original file line number Diff line number Diff line change 11.logo {
22 border-radius : 50% ;
3+ display : block;
4+ margin : 0 ;
5+ padding : 0 ;
36}
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ const Homepage = () => {
7272 < div className = "content-wrapper" >
7373 < div className = "homepage-logo-container" >
7474 < div style = { logoStyle } >
75- < Logo width = { logoSize } />
75+ < Logo width = { logoSize } link = { false } />
7676 </ div >
7777 </ div >
7878
You can’t perform that action at this time.
0 commit comments