From fd1718a1f4fc988ac4d391d8a6abde91282e7f53 Mon Sep 17 00:00:00 2001 From: Clayton Wilson Date: Tue, 3 Dec 2019 20:54:54 -0500 Subject: [PATCH] Fixing more errors --- twistter-frontend/package.json | 2 +- twistter-frontend/src/Writing_Microblogs.js | 2 +- twistter-frontend/src/pages/Home.js | 6 +++--- twistter-frontend/src/pages/Search.js | 9 +++++---- twistter-frontend/src/pages/user.js | 14 +++++++------- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/twistter-frontend/package.json b/twistter-frontend/package.json index 75afcb0..52e50f3 100644 --- a/twistter-frontend/package.json +++ b/twistter-frontend/package.json @@ -43,5 +43,5 @@ "last 1 safari version" ] }, - "proxy": "http://localhost:5006/twistter-e4649/us-central1/api" + "proxy": "http://localhost:5001/twistter-e4649/us-central1/api" } diff --git a/twistter-frontend/src/Writing_Microblogs.js b/twistter-frontend/src/Writing_Microblogs.js index e983690..70b67d0 100644 --- a/twistter-frontend/src/Writing_Microblogs.js +++ b/twistter-frontend/src/Writing_Microblogs.js @@ -5,7 +5,7 @@ import axios from "axios"; // Material-UI import TextField from '@material-ui/core/TextField'; -import Typography from '@material-ui/core/Typography'; +// import Typography from '@material-ui/core/Typography'; import Button from '@material-ui/core/Button'; import withStyles from "@material-ui/styles/withStyles"; diff --git a/twistter-frontend/src/pages/Home.js b/twistter-frontend/src/pages/Home.js index 9fffb4c..7b1ba6d 100644 --- a/twistter-frontend/src/pages/Home.js +++ b/twistter-frontend/src/pages/Home.js @@ -86,7 +86,7 @@ class Home extends Component { ); return ( - authenticated ? + authenticated ? ( @@ -122,7 +122,7 @@ class Home extends Component { - ); + )); } } @@ -343,7 +343,7 @@ const mapStateToProps = (state) => ({ Home.propTypes = { user: PropTypes.object.isRequired, - clases: PropTypes.object.isRequired, + classes: PropTypes.object.isRequired, UI: PropTypes.object.isRequired } diff --git a/twistter-frontend/src/pages/Search.js b/twistter-frontend/src/pages/Search.js index c8409f5..c6b9e70 100644 --- a/twistter-frontend/src/pages/Search.js +++ b/twistter-frontend/src/pages/Search.js @@ -1,6 +1,7 @@ import React, { Component } from "react"; // import props -import { TextField, Button } from "@material-ui/core"; +// import { TextField, Button } from "@material-ui/core"; +import TextField from "@material-ui/core/TextField" import Grid from "@material-ui/core/Grid"; import axios from "axios"; import Fuse from "fuse.js"; @@ -38,7 +39,7 @@ export class Search extends Component { handles: res.data, loading: false }, () => { - console.log(res.data); + // console.log(res.data); fuse = new Fuse(this.state.handles, fuseOptions); // "list" is the item array }) }) @@ -65,7 +66,7 @@ export class Search extends Component { let result = fuse.search(event.target.value); let parsed = []; result.forEach((res) => { - console.log(res) + // console.log(res) parsed.push(this.state.handles[res]) }) this.setState({ @@ -80,7 +81,7 @@ export class Search extends Component { render() { let resultMarkup = this.state.searchResult && this.state.searchResult !== "No Results" ? ( this.state.searchResult.map(res => - +
{res} diff --git a/twistter-frontend/src/pages/user.js b/twistter-frontend/src/pages/user.js index 7a8f929..6a189b6 100644 --- a/twistter-frontend/src/pages/user.js +++ b/twistter-frontend/src/pages/user.js @@ -76,7 +76,7 @@ class user extends Component { profile: null, imageUrl: null, topics: null, - newTopic: null + newTopic: "" }; } @@ -179,7 +179,7 @@ class user extends Component { topic => ( this.handleDelete(topic)} /> ) // console.log({ topic }.topic.id) @@ -206,7 +206,7 @@ class user extends Component { let postMarkup = this.state.posts ? ( this.state.posts.map(post => ( - + {this.state.imageUrl ? ( @@ -215,7 +215,7 @@ class user extends Component { )} - + {post.userHandle} @@ -285,7 +285,7 @@ class user extends Component { @@ -321,7 +321,7 @@ const mapStateToProps = state => ({ user.propTypes = { user: PropTypes.object.isRequired, - clases: PropTypes.object.isRequired + classes: PropTypes.object.isRequired }; export default connect(mapStateToProps)(withStyles(styles)(user));