Skip to content

Commit

Permalink
style: reduce content in search and blurb
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 committed Apr 3, 2024
1 parent 431125e commit 86b7c89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 42 deletions.
46 changes: 9 additions & 37 deletions components/search/Blurb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,26 @@ interface BlurbProps {
) => CollegeObject[];
data: CollegeObject[] | undefined;
filterValues: FilterValues;
searchUniversity: string;
searchGE: string;
}

const SearchBlurb = (props: BlurbProps) => {
const { filterData, data, filterValues, searchUniversity, searchGE } =
props;
const Blurb = (props: BlurbProps) => {
const { filterData, data, filterValues } = props;

return (
<>
<div className="mt-8 flex flex-col gap-4 md:mt-16 md:gap-8">
<div className="text-3xl font-medium md:text-4xl">
Search Results
</div>
<div className="flex flex-col gap-2 text-lg font-normal text-gray md:text-xl">
<div className="mt-4 flex flex-col gap-y-2 md:mt-8 md:gap-y-4">
<div className="flex flex-col gap-2 text-base font-normal text-gray sm:text-lg md:text-xl">
<div>
We found{" "}
<b className="text-black">
{data ? filterData(data, filterValues).length : "x"}{" "}
courses
</b>{" "}
that may articulate to{" "}
<b className="text-black">{searchUniversity}</b> for{" "}
<b className="text-black">{`${searchGE?.split(
" ",
)[0]} Category ${searchGE?.split(" ")[1]}`}</b>{" "}
based on{" "}
<a
href="https://assist.org/"
target="_blank"
referrerPolicy="no-referrer"
className="underline underline-offset-[5px]"
>
Assist.org
</a>{" "}
and{" "}
<a
href="https://cvc.edu/"
target="_blank"
referrerPolicy="no-referrer"
className="underline underline-offset-[5px]"
>
CVC.edu
</a>
. Please consult an academic advisor for further
information.
based on your search and filters. Please consult an
academic advisor for further information.
</div>
<div className="flex text-base font-light text-gray md:justify-end">

<div className="flex text-sm font-light text-gray md:justify-end md:text-base">
{"GE-Z's"} data was last updated on 3/7
</div>
</div>
Expand All @@ -66,4 +38,4 @@ const SearchBlurb = (props: BlurbProps) => {
);
};

export default SearchBlurb;
export default Blurb;
8 changes: 3 additions & 5 deletions components/search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import SearchResults from "./SearchResults";
import ScrollToTop from "./ScrollToTop";
import { FaFilter } from "react-icons/fa6";
import { SearchFilterPage, SearchFilters } from "./Filters";
import SearchBlurb from "./Blurb";
import Blurb from "./Blurb";
import { filterData } from "./filter-utils";
import { UNIVERSITY_GE } from "@/lib/constants";

Expand Down Expand Up @@ -256,7 +256,7 @@ const Search = () => {
courses={courses}
/>
) : (
<div className="wrapper mb-8 mt-8 min-h-[calc(100vh-96px)] px-4 md:mb-16 md:mt-16 lg:px-28 xl:px-36">
<div className="wrapper my-8 min-h-[calc(100vh-96px)] px-4 md:my-16 lg:px-28 xl:px-36">
<div className="flex flex-wrap text-6xl font-bold">
Search{" "}
<span className="hidden lg:flex">
Expand All @@ -280,12 +280,10 @@ const Search = () => {
</div>
</div>
<div>
<SearchBlurb
<Blurb
filterData={filterData}
data={courses}
filterValues={filterValues}
searchUniversity={university}
searchGE={ge}
/>
<div className="mt-8 flex flex-row gap-4 md:mt-16 md:gap-8">
<div className="hidden h-fit rounded-xl bg-bg_secondary p-8 xl:flex xl:flex-col">
Expand Down

0 comments on commit 86b7c89

Please sign in to comment.