From 2bd1c08c2c499db3fc0726dcf09c67de5f4efc16 Mon Sep 17 00:00:00 2001 From: Clayton Wilson Date: Sun, 3 Nov 2019 15:17:14 -0500 Subject: [PATCH] Writing_Microblogs to Material-UI and UI improvements --- twistter-frontend/src/Writing_Microblogs.js | 142 +++++--------------- twistter-frontend/src/pages/Home.js | 2 +- twistter-frontend/src/pages/Login.js | 4 +- twistter-frontend/src/pages/Signup.js | 4 + twistter-frontend/src/pages/user.js | 2 +- 5 files changed, 40 insertions(+), 114 deletions(-) diff --git a/twistter-frontend/src/Writing_Microblogs.js b/twistter-frontend/src/Writing_Microblogs.js index e800d56..040875a 100644 --- a/twistter-frontend/src/Writing_Microblogs.js +++ b/twistter-frontend/src/Writing_Microblogs.js @@ -5,6 +5,7 @@ import axios from "axios"; // Material-UI import TextField from '@material-ui/core/TextField'; +import Typography from '@material-ui/core/Typography'; import Button from '@material-ui/core/Button'; import withStyles from "@material-ui/styles/withStyles"; @@ -19,11 +20,8 @@ const styles = { marginLeft: "50px" }, textField: { - marginBottom: 20 + marginBottom: 15 } - // TextField: { - // marginBottom: "30px" - // } } class Writing_Microblogs extends Component { @@ -50,7 +48,7 @@ class Writing_Microblogs extends Component { this.setState({ topics: event.target.value }); } - handleSubmit(event) { + handleSubmit = (event) => { // alert('A title for the microblog was inputted: ' + this.state.title + '\nA microblog was posted: ' + this.state.value); const postData = { body: this.state.value, @@ -77,6 +75,7 @@ class Writing_Microblogs extends Component { } handleChangeforPost(event) { + this.setState({ value: event.target.value }); } @@ -89,145 +88,66 @@ class Writing_Microblogs extends Component { render() { const { classes } = this.props; return ( - //
- //
- //
- // {/*