Front: Fix API calls with JWT Token

This commit is contained in:
Arthi-chaud
2022-11-13 15:48:52 +00:00
parent 4ecd556918
commit 889d07cfe5
22 changed files with 368 additions and 248 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import React from "react";
import SearchBar from "../components/SearchBar";
import SearchBar, { IllustratedSuggestionProps } from "../components/SearchBar";
import { SuggestionList, SuggestionType } from "../components/SearchBar";
interface SearchBarSuggestionsProps {
onTextSubmit: (text: string) => void;
@@ -15,7 +15,7 @@ const filterSuggestions = (text: string, suggestions: SuggestionList) => {
case SuggestionType.ILLUSTRATED:
return (
suggestion.data.text.toLowerCase().includes(text.toLowerCase()) ||
suggestion.data.subtext.toLowerCase().includes(text.toLowerCase())
(suggestion.data as IllustratedSuggestionProps).subtext.toLowerCase().includes(text.toLowerCase())
);
}
});