Fixing more errors

This commit is contained in:
Clayton Wilson 2019-12-03 20:54:54 -05:00
parent 7fd976d4cb
commit fd1718a1f4
5 changed files with 17 additions and 16 deletions

View File

@ -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"
}

View File

@ -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";

View File

@ -86,7 +86,7 @@ class Home extends Component {
);
return (
authenticated ?
authenticated ? (
<Grid container>
<Grid item sm={4} xs={8}>
<Writing_Microblogs />
@ -122,7 +122,7 @@ class Home extends Component {
</form>
</div>
</div>
);
));
}
}
@ -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
}

View File

@ -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 =>
<Router>
<Router key={res}>
<div>
<a href={`/user/${res}`}>
{res}

View File

@ -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 => (
<MyChip
label={topic}
key={topic.id}
key={topic}
onDelete={key => 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 => (
<Card className={classes.card}>
<Card className={classes.card} key={post.postId}>
<CardContent>
<Typography>
{this.state.imageUrl ? (
@ -215,7 +215,7 @@ class user extends Component {
<img src={noImage} height="50" width="50" />
)}
</Typography>
<Typography variant="h7">
<Typography variant="h6">
<b>{post.userHandle}</b>
</Typography>
<Typography variant="body2" color={"textSecondary"}>
@ -285,7 +285,7 @@ class user extends Component {
<TextField
id="newTopic"
label="new topic"
defaultValue=""
// defaultValue=""
margin="normal"
variant="outlined"
value={this.state.newTopic}
@ -295,7 +295,7 @@ class user extends Component {
className={classes.addCircle}
color="primary"
// iconStyle={classes.addCircle}
clickable
clickable="true"
onClick={this.handleAddCircle}
cursor="pointer"
/>
@ -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));