ehodges
12/11/2017, 5:20 PM17 | <Link to=‘/create’ className=‘ml1 no-underline black’>submit</Link>| ^ 18 | </div> 19 | } 20 | </div>
iamclaytonray
12/11/2017, 7:04 PMclass Header extends Component {
render() {
const userId = localStorage.getItem(GC_USER_ID);
return (
<div className='flex pa1 justify-between nowrap orange'>
<div className='flex flex-fixed black'>
<div className='fw7 mr1'>Hacker News</div>
<Link to='/' className='ml1 no-underline black'>new</Link>
{userId &&
<div>
<div className='ml1'>|</div>
<Link to='/create' className='ml1 no-underline black'>submit</Link>
</div>
}
</div>
<div className='flex flex-fixed'>
{userId ?
<div className='ml1 pointer black' onClick={() => {
localStorage.removeItem(GC_USER_ID);
localStorage.removeItem(GC_AUTH_TOKEN);
this.props.history.push(`/new/1`);
}}>logout</div>
:
<Link to='/login' className='ml1 no-underline black'>login</Link>
}
</div>
</div>
);
}
}
iamclaytonray
12/11/2017, 7:04 PM<div>
in:
{userId &&
<div>
<div className='ml1'>|</div>
<Link to='/create' className='ml1 no-underline black'>submit</Link>
</div>
}
ehodges
12/11/2017, 7:25 PMiamclaytonray
12/11/2017, 7:27 PMehodges
12/11/2017, 9:25 PMiamclaytonray
12/11/2017, 9:26 PMgit commit -am "Your commit message here"
iamclaytonray
12/11/2017, 9:27 PMiamclaytonray
12/11/2017, 9:29 PMehodges
12/11/2017, 9:35 PMehodges
12/11/2017, 9:36 PMehodges
12/11/2017, 9:36 PMiamclaytonray
12/11/2017, 9:37 PMiamclaytonray
12/11/2017, 9:37 PMgit add <filename>
or git add .
for all
git commit -m "Some message"
git push
to push those commits upiamclaytonray
12/11/2017, 9:38 PMiamclaytonray
12/11/2017, 9:38 PMgit commit -am "Some message"
adds all of the files to git and commits them in a single command 😄ehodges
12/11/2017, 9:39 PMiamclaytonray
12/11/2017, 9:39 PMehodges
12/11/2017, 9:39 PMiamclaytonray
12/11/2017, 9:39 PMehodges
12/11/2017, 9:42 PMehodges
12/11/2017, 10:08 PM