File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
overload/src/app/components Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ export const SearchBar = () => {
23
23
fetch ( 'http://localhost:3000/api/home' , { cache : 'no-store' } ) // Fetch terms
24
24
. then ( ( response ) => response . json ( ) ) // turn data from promise into a json file so we can use data
25
25
. then ( ( data ) => {
26
- console . log ( data ) ;
27
26
setDataList ( data ) ;
28
27
} ) // set data using setData hook
29
28
. catch ( ( error ) => {
@@ -33,7 +32,8 @@ export const SearchBar = () => {
33
32
} , [ ] ) ;
34
33
35
34
const filteredData : Term [ ] = dataList . filter ( ( item : Term ) =>
36
- item . course . courseName . toLowerCase ( ) . includes ( searchTerm . toLowerCase ( ) )
35
+ item . course . courseName . toLowerCase ( ) . includes ( searchTerm . toLowerCase ( ) ) ||
36
+ item . course . courseCode . toLowerCase ( ) . includes ( searchTerm . toLocaleLowerCase ( ) )
37
37
) ;
38
38
39
39
const courseCards = filteredData . map ( ( item , idx ) => {
You can’t perform that action at this time.
0 commit comments