forked from tanner/qotnews
feat: Immediately display stories on first load
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -20,6 +20,11 @@ function Feed({ updateCache }) {
|
||||
|
||||
if (!updated) return;
|
||||
|
||||
if (!stories || !stories.length) {
|
||||
setStories(newApiStories);
|
||||
localStorage.setItem('stories', JSON.stringify(newApiStories));
|
||||
}
|
||||
|
||||
let currentStories = Array.isArray(stories) ? [...stories] : [];
|
||||
|
||||
for (const newStory of [...newApiStories].reverse()) {
|
||||
|
||||
Reference in New Issue
Block a user