mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-08 18:49:26 +00:00
Refac refresh video list when videoId changing
This commit is contained in:
@@ -56,6 +56,7 @@ const Search = () => {
|
||||
const playlistList = searchResults?.results.playlist_results;
|
||||
const fulltextList = searchResults?.results.fulltext_results;
|
||||
const queryType = searchResults?.queryType;
|
||||
const refreshWhenVideoIdChanges = videoId !== null;
|
||||
|
||||
const hasSearchQuery = searchTerm.length > 0;
|
||||
const hasVideos = Number(videoList?.length) > 0;
|
||||
@@ -89,7 +90,7 @@ const Search = () => {
|
||||
} else {
|
||||
setSearchResults(EmptySearchResponse);
|
||||
}
|
||||
}, [debouncedSearchTerm, refresh]);
|
||||
}, [debouncedSearchTerm, refresh, refreshWhenVideoIdChanges]);
|
||||
|
||||
const fetchResults = async (searchQuery: string) => {
|
||||
const searchResults = await loadSearch(searchQuery);
|
||||
|
||||
Reference in New Issue
Block a user