Skip to content

Commit

Permalink
404 page style
Browse files Browse the repository at this point in the history
  • Loading branch information
billie66 committed Mar 17, 2016
1 parent fd08a88 commit 1b2e3d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions client/shared/PageNotFound.jsx
Expand Up @@ -2,6 +2,7 @@ PageNotFound = React.createClass({
render() {
return (
<div className='page-not-found'>
<Hamburger iconColor='#00bcd4' />
<div className='cartoon'>
<img src='/images/peter.jpeg' />
<div className='tip'>Page Not Found</div>
Expand Down
3 changes: 1 addition & 2 deletions client/stylesheets/main.scss
Expand Up @@ -11,12 +11,11 @@
}

.page-not-found {
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
.cartoon {
padding: 2em 1em;
margin: 6em 1em 3em;
.tip {
color: #ff4081;
font-size: 25px;
Expand Down
6 changes: 4 additions & 2 deletions client/video/Post.jsx
Expand Up @@ -4,7 +4,8 @@ Post = React.createClass({
getInitialState() {
return {
metaData: {},
post: ''
post: '',
validFile: true
};
},
getMeteorData() {
Expand All @@ -26,7 +27,7 @@ Post = React.createClass({

Meteor.call('/video/getPost', postId, function(err, res){
if (err) {
console.log(`The post does not exist!`);
that.setState({validFile: false});
return;
}
that.setState({
Expand Down Expand Up @@ -62,6 +63,7 @@ Post = React.createClass({
display: 'block'
}
};
if (!this.state.validFile) return <PageNotFound />;
return (
<div className="post-page">
<Hamburger />
Expand Down

0 comments on commit 1b2e3d5

Please sign in to comment.