Skip to content

Commit

Permalink
fix: correct imports
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 committed Dec 29, 2023
1 parent 02773bf commit d06be1a
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 20 deletions.
12 changes: 6 additions & 6 deletions __tests__/search-filters.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FilterValues } from "@/components/search/search";
import { FilterValues } from "@/components/search/Search";
import {
endsBefore,
filterData,
Expand Down Expand Up @@ -81,7 +81,7 @@ const defaultFilterValues: FilterValues = {
enrollment: [false],
available: [false],
start: "2023-12-20",
end: undefined,
end: "",
institution: "Any Institution",
min: 0,
max: 20,
Expand Down Expand Up @@ -192,8 +192,8 @@ describe("Search Filters", () => {
});

describe("Filter Utils' Time Utilities", () => {
test("startsAfter undefined", async () => {
const result = startsAfter(undefined, data.courses[0]);
test("startsAfter none", async () => {
const result = startsAfter("", data.courses[0]);
expect(result).toBe(true);
});

Expand All @@ -207,8 +207,8 @@ describe("Filter Utils' Time Utilities", () => {
expect(result).toBe(false);
});

test("endsBefore undefined", async () => {
const result = endsBefore(undefined, data.courses[0]);
test("endsBefore none", async () => {
const result = endsBefore("", data.courses[0]);
expect(result).toBe(true);
});

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion components/search/Blurb.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { CollegeObject, FilterValues } from "./search";
import { CollegeObject, FilterValues } from "./Search";

interface BlurbProps {
filterData: (
Expand Down
2 changes: 1 addition & 1 deletion components/search/FilterComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import React, { ChangeEvent, Dispatch, SetStateAction, useState } from "react";
import { FaCheck, FaChevronDown } from "react-icons/fa";
import { CollegeObject } from "./search";
import { CollegeObject } from "./Search";

interface FilterCheckboxProps {
title: string;
Expand Down
4 changes: 2 additions & 2 deletions components/search/Filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
CustomFilterCheckbox,
InstitutionDropdown,
UnitsFilter,
} from "./filterComponents";
} from "./FilterComponents";
import { FaCircleXmark } from "react-icons/fa6";
import { CollegeObject, FilterValues } from "./search";
import { CollegeObject, FilterValues } from "./Search";

interface SearchFilterProps {
handleClick: () => void;
Expand Down
6 changes: 3 additions & 3 deletions components/search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import React, { useEffect, useState } from "react";
import { DropdownComponentSearch } from "../DropdownComponent";
import { SortDropdown } from "./filterComponents";
import { SortDropdown } from "./FilterComponents";
import { useRouter, useSearchParams } from "next/navigation";
import { queryDatabase } from "./query-db";
import SearchResults from "./searchResults";
import SearchResults from "./SearchResults";
import { FaFilter } from "react-icons/fa6";
import { SearchFilterPage, SearchFilters } from "./filters";
import { SearchFilterPage, SearchFilters } from "./Filters";
import SearchBlurb from "./Blurb";
import { filterData } from "./filter-utils";
import { UNIVERSITY_GE } from "@/lib/constants";
Expand Down
4 changes: 2 additions & 2 deletions components/search/SearchResults.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import LazyLoad from "react-lazy-load";
import { FaUpRightFromSquare } from "react-icons/fa6";
import { CollegeObject } from "./search";
import Tags from "./tags";
import { CollegeObject } from "./Search";
import Tags from "./Tags";

interface SearchResultsProps {
results: CollegeObject[];
Expand Down
7 changes: 2 additions & 5 deletions components/search/filter-utils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { CollegeObject, FilterValues } from "./search";
import { CollegeObject, FilterValues } from "./Search";

export const startsAfter = (
start: string | undefined,
result: CollegeObject,
) => {
export const startsAfter = (start: string, result: CollegeObject) => {
if (start == undefined) return true;

return (
Expand Down

0 comments on commit d06be1a

Please sign in to comment.