From 848104211d014931630d89a66e67c6941f61b4a9 Mon Sep 17 00:00:00 2001 From: aadalal <57609353+AaDalal@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:40:39 -0500 Subject: [PATCH] partially fix search --- frontend/degree-plan/components/Dock/DockedCourse.tsx | 2 +- frontend/degree-plan/components/Search/SearchPanel.tsx | 2 +- frontend/degree-plan/next.config.js | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/degree-plan/components/Dock/DockedCourse.tsx b/frontend/degree-plan/components/Dock/DockedCourse.tsx index 48b0722f9..1fbbdcf12 100644 --- a/frontend/degree-plan/components/Dock/DockedCourse.tsx +++ b/frontend/degree-plan/components/Dock/DockedCourse.tsx @@ -2,7 +2,7 @@ import React from "react"; import { BaseCourseContainer, RemoveCourseButton } from '../FourYearPlan/CoursePlanned'; -import { GrayIcon } from '../bulma_derived_components'; +import { GrayIcon } from '@/components/common/bulma_derived_components'; import { useDrag } from 'react-dnd'; import styled from '@emotion/styled'; import { ItemTypes } from '../dnd/constants'; diff --git a/frontend/degree-plan/components/Search/SearchPanel.tsx b/frontend/degree-plan/components/Search/SearchPanel.tsx index 4ec9e200c..79bae7e47 100644 --- a/frontend/degree-plan/components/Search/SearchPanel.tsx +++ b/frontend/degree-plan/components/Search/SearchPanel.tsx @@ -124,7 +124,7 @@ const GeneralSearchResult = ({setClosed, reqId, reqQuery, queryString, setQueryS React.useEffect(() => { setIsLoadingCourses(true); - fetch(`api/base/2023A/search/courses/?search=${queryString}`) + fetch(`/api/base/current/courses/search?search=${queryString}`) .then(r => r.json()) .then((courses) => { setCourses([...courses]); diff --git a/frontend/degree-plan/next.config.js b/frontend/degree-plan/next.config.js index 8901dd66b..8e55f1740 100644 --- a/frontend/degree-plan/next.config.js +++ b/frontend/degree-plan/next.config.js @@ -16,6 +16,10 @@ const nextConfig = { source: '/api/options', destination: 'http://127.0.0.1:8000/api/options/' }, + { + source: '/api/base/current/courses/search', + destination: 'http://127.0.0.1:8000/api/base/current/courses/search/' + }, { source: '/api/:apipath*', destination: 'http://127.0.0.1:8000/api/:apipath*'