From 1b2e3d567f8599de577041536cffe07a6e666969 Mon Sep 17 00:00:00 2001 From: Billie Zhang Date: Thu, 17 Mar 2016 10:31:12 +0800 Subject: [PATCH] 404 page style --- client/shared/PageNotFound.jsx | 1 + client/stylesheets/main.scss | 3 +-- client/video/Post.jsx | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/shared/PageNotFound.jsx b/client/shared/PageNotFound.jsx index 1f20425..14ea939 100644 --- a/client/shared/PageNotFound.jsx +++ b/client/shared/PageNotFound.jsx @@ -2,6 +2,7 @@ PageNotFound = React.createClass({ render() { return (
+
Page Not Found
diff --git a/client/stylesheets/main.scss b/client/stylesheets/main.scss index abe9a39..898987f 100644 --- a/client/stylesheets/main.scss +++ b/client/stylesheets/main.scss @@ -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; diff --git a/client/video/Post.jsx b/client/video/Post.jsx index fd01580..c902ee0 100644 --- a/client/video/Post.jsx +++ b/client/video/Post.jsx @@ -4,7 +4,8 @@ Post = React.createClass({ getInitialState() { return { metaData: {}, - post: '' + post: '', + validFile: true }; }, getMeteorData() { @@ -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({ @@ -62,6 +63,7 @@ Post = React.createClass({ display: 'block' } }; + if (!this.state.validFile) return ; return (