Front: More Typechecks

This commit is contained in:
Arthur Jamet
2023-06-08 12:25:34 +01:00
parent 19ded9ca74
commit d7848692f7
8 changed files with 7 additions and 16 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ type SearchViewProps = {
const SearchView = (props: RouteProps<SearchViewProps>) => {
let isRequestSucceeded = false;
const [filter, setFilter] = useState<Filter>("all");
const [stringQuery, setStringQuery] = useState<string>(props.query || "");
const [stringQuery, setStringQuery] = useState<string>(props?.query ?? "");
const { isLoading: isLoadingSong, data: songData = [] } = useQuery(
["song", stringQuery],