Logging
This commit is contained in:
@@ -35,7 +35,7 @@ function Feed({ updateCache }) {
|
||||
const fullStory = storyResult.story;
|
||||
|
||||
await localForage.setItem(fullStory.id, fullStory);
|
||||
console.log('preloaded', fullStory.id, fullStory.title);
|
||||
console.log('Preloaded story:', fullStory.id, fullStory.title);
|
||||
updateCache(fullStory.id, fullStory);
|
||||
|
||||
currentStories.unshift(newStory);
|
||||
@@ -47,6 +47,7 @@ function Feed({ updateCache }) {
|
||||
const finalStories = currentStories.slice(0, newApiStories.length);
|
||||
const removedStories = currentStories.slice(newApiStories.length);
|
||||
for (const story of removedStories) {
|
||||
console.log('Removed story:', story.id, story.title);
|
||||
localForage.removeItem(story.id);
|
||||
}
|
||||
|
||||
@@ -59,8 +60,6 @@ function Feed({ updateCache }) {
|
||||
);
|
||||
}, [updateCache]);
|
||||
|
||||
console.log(stories);
|
||||
|
||||
return (
|
||||
<div className='container'>
|
||||
<Helmet>
|
||||
|
||||
Reference in New Issue
Block a user