File tree 1 file changed +11
-5
lines changed
src/components/presentational
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React from 'react';
2
2
import Link from 'next/link' ;
3
3
import PropTypes from 'prop-types' ;
4
4
5
- const HeaderNav = props => (
5
+ const HeaderNav = props => ( console . log ( props . currentUrl ) ,
6
6
props . isNavVisible ?
7
7
< span className = "pagetop" >
8
8
< b className = "hnname" >
@@ -43,10 +43,16 @@ const HeaderNav = props => (
43
43
< Link prefetch href = "/submit" >
44
44
< a className = { props . currentURL === '/submit' ? 'topsel' : '' } > submit</ a >
45
45
</ Link >
46
- { ' | ' }
47
- < Link prefetch href = "/best" >
48
- < a className = { props . currentURL === '/best' ? 'topsel' : '' } > best</ a >
49
- </ Link >
46
+ {
47
+ props . currentURL === '/best' && ' | '
48
+ }
49
+ {
50
+ props . currentURL === '/best' && (
51
+ < Link prefetch href = "/best" >
52
+ < a className = "topsel" > best</ a >
53
+ </ Link >
54
+ )
55
+ }
50
56
</ span >
51
57
:
52
58
< span className = "pagetop" >
You can’t perform that action at this time.
0 commit comments