aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vnext/src/app.js6
-rw-r--r--vnext/src/components/Post.js20
2 files changed, 25 insertions, 1 deletions
diff --git a/vnext/src/app.js b/vnext/src/app.js
index fed735f7..1991a14d 100644
--- a/vnext/src/app.js
+++ b/vnext/src/app.js
@@ -5,6 +5,7 @@ const history = createHistory();
import Navigation from "./components/Navigation"
import Discover from "./components/Discover"
+import Post from "./components/Post"
class App extends React.Component {
constructor(props) {
@@ -18,7 +19,10 @@ class App extends React.Component {
return (
<div className="wrapper">
<Navigation onNavigate={this.navigate} />
- <Discover params={this.state.location.search} />
+ { location.pathname === "/" &&
+ <Discover params={this.state.location.search} /> }
+ { location.pathname === "/post" &&
+ <Post /> }
</div>
)
}
diff --git a/vnext/src/components/Post.js b/vnext/src/components/Post.js
new file mode 100644
index 00000000..54be77df
--- /dev/null
+++ b/vnext/src/components/Post.js
@@ -0,0 +1,20 @@
+import React from 'react'
+
+export default class Post extends React.Component {
+ render() {
+ return (
+ <article>
+<form action="/" method="post" id="postmsg" encType="multipart/form-data">
+ <p style={{ textAlign: 'left' }}>
+ <b>Фото:</b> <span id="attachmentfile">
+ <input style={{ width: '100%' }} type="file" name="attach"/> <i>(JPG/PNG)</i></span>
+ </p>
+ <p>
+ <textarea name="body" className="newmessage" rows="7" cols="10" placeholder="*weather It's very cold today!"></textarea>
+ <br/>
+ <input type="submit" className="subm" value=" POST "/>
+ </p>
+</form>
+</article>
+ )}
+}; \ No newline at end of file