perf(frontend): set loading immediately on playlist switch for instant indicator
This commit is contained in:
parent
449dfc708e
commit
ebc6f31d32
@ -168,6 +168,8 @@ export const usePaginatedSongs = (options: UsePaginatedSongsOptions = {}) => {
|
|||||||
currentSearchQueryRef.current = searchQuery;
|
currentSearchQueryRef.current = searchQuery;
|
||||||
|
|
||||||
// Clear state for instant visual feedback
|
// Clear state for instant visual feedback
|
||||||
|
loadingRef.current = true;
|
||||||
|
setLoading(true);
|
||||||
setSongs([]);
|
setSongs([]);
|
||||||
setTotalSongs(0);
|
setTotalSongs(0);
|
||||||
setTotalDuration(undefined);
|
setTotalDuration(undefined);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user