Skip to content

Commit

Permalink
build fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanTurner committed Jun 14, 2021
1 parent db36c01 commit 0288f87
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 39 deletions.
52 changes: 16 additions & 36 deletions src/CollegePreview.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from "react";
import Card from "@material-ui/core/Card";
import Grid from "@material-ui/core/Grid";
import { useHistory } from "react-router-dom";
import Typography from "@material-ui/core/Typography";
import { makeStyles } from "@material-ui/core/styles";
import CardContent from "@material-ui/core/CardContent";
Expand All @@ -21,31 +20,26 @@ const useStyles = makeStyles((theme) => ({
},
}));

export default function CollegePreview({results}) {
export default function CollegePreview({ results }) {
const classes = useStyles();
const history = useHistory();

if (!results) {
return (<div>No Results</div>)
return <div>No Results</div>;
}

// const handleClick = (college) => {
// const name = college.name.split(" ").join("")
// history.push(`/colleges/${name}`)
// };
//debugger
const content = results.results.map((college) =>
{
const{ admission_rate,
avg_tuition,
city,
schoolname,
state,
student_pop,
url} = college

const content = results.results.map((college) => {
const {
admission_rate,
avg_tuition,
city,
schoolname,
state,
student_pop,
url,
id,
} = college;

return (
<Grid spacing={4} className={classes.grid}>
<Grid key={id} spacing={4} className={classes.grid}>
<Card className={classes.media}>
<CardContent>
<Typography gutterBottom variant='h5' component='h2'>
Expand Down Expand Up @@ -73,21 +67,7 @@ export default function CollegePreview({results}) {
</Card>
</Grid>
);
}
);



});

return content;

}


{
/* <CardActions>
<Button onClick={() => handleClick(college)} size='small' color='primary'>
Learn More
</Button>
</CardActions> */
}
6 changes: 3 additions & 3 deletions src/CollegeSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ const useStyles = makeStyles((theme) => ({

function CollegeSelect({setResults}) {
const classes = useStyles();
const [dream, setDream] = React.useState("Pick A School");
const [dream, setDream] = React.useState(names[250]);
const [inputDream, setInputDream] = React.useState("");
const [target, setTarget] = React.useState("Pick A School");
const [target, setTarget] = React.useState(names[157]);
const [inputTarget, setInputTarget] = React.useState("");
const [safety, setSafety] = React.useState("Pick A School");
const [safety, setSafety] = React.useState(names[1]);
const [inputSafety, setInputSafety] = React.useState("");


Expand Down

0 comments on commit 0288f87

Please sign in to comment.