-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
addUser mutation, Modify dashboard for editor routes, redesig login s…
…ystem to hash passwords
- Loading branch information
1 parent
80fd0a9
commit b353c7c
Showing
5 changed files
with
84 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,46 @@ | ||
import React, { Component } from 'react'; | ||
import { Col, Row } from 'antd'; | ||
import React, { Component, Fragment } from "react"; | ||
import { Col, Row, Button } from "antd"; | ||
import { Link, Route } from "react-router-dom"; | ||
|
||
import ShortBlogpostContainer from '../components/ShortBlogpostContainer.jsx'; | ||
import ShortBlogpostContainer from "../components/ShortBlogpostContainer.jsx"; | ||
|
||
// Subpages | ||
import Editor from './Editor.jsx'; | ||
|
||
const UserDashboard = ( | ||
<Fragment> | ||
<Row style={{ background: "#ECECEC", padding: "30px" }}> | ||
<Col span={24}> | ||
<h1>Dashboard goes here</h1> | ||
</Col> | ||
</Row> | ||
<Row style={{ padding: "30px" }}> | ||
<Row> | ||
<Col span={12}> | ||
<h1>Posts</h1> | ||
</Col> | ||
<Col offset={10} span={2}> | ||
<Link to="/new/post"> | ||
<Button>Add Post</Button> | ||
</Link> | ||
</Col> | ||
</Row> | ||
<Row> | ||
<Col> | ||
<ShortBlogpostContainer /> | ||
</Col> | ||
</Row> | ||
</Row> | ||
</Fragment> | ||
); | ||
|
||
export default class Dashboard extends Component { | ||
render() { | ||
return ( | ||
<div> | ||
<Row style={{ background: '#ECECEC', padding: '30px' }}> | ||
<Col span={24}> | ||
<h1> | ||
Dashboard goes here | ||
</h1> | ||
</Col> | ||
</Row> | ||
<Row style={{ padding: '30px' }}> | ||
<h1>Posts</h1> | ||
<Row> | ||
<Col span={12}> | ||
<ShortBlogpostContainer /> | ||
</Col> | ||
</Row> | ||
</Row> | ||
<Route path="/new/post" component={Editor} /> | ||
<Route path="/" render={() => UserDashboard} /> | ||
</div> | ||
) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React, { Component } from 'react'; | ||
import { Col, Row } from 'antd'; | ||
|
||
class Editor extends Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
|
||
} | ||
} | ||
|
||
render () { | ||
return ( | ||
<div> | ||
<Row> | ||
<Col span={12}> | ||
Editor goes here | ||
</Col> | ||
<Col span={12}> | ||
Preview goes here | ||
</Col> | ||
</Row> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default Editor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters