mirror of
https://github.com/AmanTahiliani/PeerNotes.git
synced 2026-08-07 11:55:12 -04:00
fix types
This commit is contained in:
@@ -4,7 +4,7 @@ import '../styles/MainScreenWrapper.css';
|
|||||||
import { getSessionCookie } from '../contexts/session';
|
import { getSessionCookie } from '../contexts/session';
|
||||||
import { Professor, Course, Topic } from "../types/types";
|
import { Professor, Course, Topic } from "../types/types";
|
||||||
|
|
||||||
interface Filters {
|
interface Filters extends Record<string, string> {
|
||||||
professor: string;
|
professor: string;
|
||||||
course: string;
|
course: string;
|
||||||
topic: string;
|
topic: string;
|
||||||
@@ -104,7 +104,7 @@ const MainSearch: React.FC = () => {
|
|||||||
|
|
||||||
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const searchParams = new URLSearchParams(filters as any);
|
const searchParams = new URLSearchParams(filters);
|
||||||
navigate(`/results?${searchParams}`);
|
navigate(`/results?${searchParams}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user