From 5cdfee4b4704be7fcc2811b228f4a68bc75acd7a Mon Sep 17 00:00:00 2001
From: Awesome-E <54484616+Awesome-E@users.noreply.github.com>
Date: Mon, 13 Jan 2025 12:29:05 -0800
Subject: [PATCH] Improve placeholders
---
site/src/pages/RoadmapPage/SearchSidebar.tsx | 62 ++++++++++++--------
1 file changed, 39 insertions(+), 23 deletions(-)
diff --git a/site/src/pages/RoadmapPage/SearchSidebar.tsx b/site/src/pages/RoadmapPage/SearchSidebar.tsx
index 3ee67c64..bbf04115 100644
--- a/site/src/pages/RoadmapPage/SearchSidebar.tsx
+++ b/site/src/pages/RoadmapPage/SearchSidebar.tsx
@@ -15,6 +15,7 @@ import Course from './Course';
import { courseSearchSortable } from '../../helpers/sortable';
import { Spinner } from 'react-bootstrap';
import { useNamedAcademicTerm } from '../../hooks/namedAcademicTerm';
+import noResultsImg from '../../asset/no-results-crop.webp';
const CloseRoadmapSearchButton = () => {
const isMobile = useIsMobile();
@@ -32,6 +33,25 @@ const CloseRoadmapSearchButton = () => {
);
};
+interface SearchPlaceholderProps {
+ searchInProgress: boolean;
+ showCourseBag: boolean;
+}
+const SearchPlaceholder = ({ searchInProgress, showCourseBag }: SearchPlaceholderProps) => {
+ if (searchInProgress) return
No courses saved. Try searching for something!
- ); - return ( <> {isMobile && showSearch &&