From 0288f87a068fde4a140de79fdc81af4ee305079d Mon Sep 17 00:00:00 2001 From: Roman Turner Date: Sun, 13 Jun 2021 21:25:12 -0700 Subject: [PATCH] build fixed --- src/CollegePreview.js | 52 +++++++++++++------------------------------ src/CollegeSelect.js | 6 ++--- 2 files changed, 19 insertions(+), 39 deletions(-) diff --git a/src/CollegePreview.js b/src/CollegePreview.js index 1de5160..98c9ebe 100644 --- a/src/CollegePreview.js +++ b/src/CollegePreview.js @@ -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"; @@ -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 (
No Results
) + return
No Results
; } - // 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 ( - + @@ -73,21 +67,7 @@ export default function CollegePreview({results}) { ); - } - ); - - - + }); return content; - } - - - { - /* - - */ - } \ No newline at end of file diff --git a/src/CollegeSelect.js b/src/CollegeSelect.js index ec71e82..0053f53 100644 --- a/src/CollegeSelect.js +++ b/src/CollegeSelect.js @@ -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("");