Fix search offset not working when first time load with 'type'

pull/182/head
Lim Chee Aun 2023-07-13 20:10:39 +08:00
rodzic fa21eec06a
commit 1e28efd9bb
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -101,6 +101,10 @@ function Search(props) {
setStatusResults(results.statuses);
setAccountResults(results.accounts);
setHashtagResults(results.hashtags);
if (type) {
offsetRef.current = LIMIT;
setShowMore(results[type]?.length >= LIMIT);
}
}
setUiState('default');
} catch (err) {