Skip to content

Commit

Permalink
some cosmetics, fixes #27 (sort of) and #31
Browse files Browse the repository at this point in the history
  • Loading branch information
thunder-red-star committed Mar 15, 2023
1 parent 15918d9 commit 237d5b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 671 deletions.
36 changes: 5 additions & 31 deletions src/pages/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
Box,
} from "@mui/material";

import SearchBar from "../comps/home/SearchBar";

const ELIGIBILITY_QUERY = gql`
query Eligibilities {
eligibilities {
Expand Down Expand Up @@ -193,17 +195,6 @@ const Catalog = () => {
: initialEligibilities
);

//console.log("Categories:");
//console.log(categories);
//console.log("Eligibilities:");
//console.log(eligibilities);
//console.log("Init eligibilities:");
//console.log(initialEligibilities);
//console.log("All grades:");
//console.log(allGrades);
//console.log("All eligibilities:");
//console.log(allEligibilities);

const selectedGrades = eligibilities?.filter(
(eligibility) => !eligibility.match(" ")
);
Expand Down Expand Up @@ -336,16 +327,6 @@ const Catalog = () => {
>
<b className={"block w-full mb-2"}>Categories</b>
{allCategories.map((category) => (
/*
<FormControlLabel
checked={eligibilities.indexOf(eligibility) > -1}
control={
<Checkbox onChange={() => toggleEligibility(eligibility)} />
}
label={eligibility}
/>
*/
// Render a chip instead of a checkbox, the chip can be toggled on/off
<Chip
variant="outlined"
label={category}
Expand All @@ -358,16 +339,6 @@ const Catalog = () => {
))}
<b className={"block w-full mb-2"}>Eligibilities</b>
{allEligibilities.map((eligibility) => (
/*
<FormControlLabel
checked={eligibilities.indexOf(eligibility) > -1}
control={
<Checkbox onChange={() => toggleEligibility(eligibility)} />
}
label={eligibility}
/>
*/
// Render a chip instead of a checkbox, the chip can be toggled on/off
<Chip
variant="outlined"
label={eligibility}
Expand Down Expand Up @@ -490,6 +461,9 @@ const Catalog = () => {
<Grid item xs={12} sm={12} md={12} lg={12} xl={12} className="sticky">
<Typography variant={"h1"}>Catalog</Typography>
</Grid>
<Grid item xs={12} sm={12} md={12} lg={12} xl={12}>
<SearchBar />
</Grid>
{renderFilters()}
<Grid item xs={12} sm={12} md={8} lg={9} xl={9}>
{searchParams && searchParams.get("q") ? (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/opportunity/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const Opportunity = ({ match, history }) => {
</Helmet>
<main>
<ArrowBackIcon
onClick={() => navigate("/catalog")}
onClick={() => navigate(-1)}
className={"opacity-50 hover:opacity-80"}
style={{ fontSize: 40, cursor: "pointer", transition: "all 300ms" }}
/>
Expand Down
Loading

0 comments on commit 237d5b4

Please sign in to comment.