diff --git a/assets/icon.png b/assets/icon.png
index a0b1526..4edbdfe 100644
Binary files a/assets/icon.png and b/assets/icon.png differ
diff --git a/src/app/(tabs)/home/index.tsx b/src/app/(tabs)/home/index.tsx
index c7c920c..67b4a51 100644
--- a/src/app/(tabs)/home/index.tsx
+++ b/src/app/(tabs)/home/index.tsx
@@ -150,11 +150,12 @@ function HomeScreen() {
{featuredStories.length > 0 && (
Featured Stories
- {featuredStoriesDescription != null && featuredStoriesDescription.length > 0 && (
-
- {featuredStoriesDescription}
-
- )}
+ {featuredStoriesDescription != null &&
+ featuredStoriesDescription.length > 0 && (
+
+ {featuredStoriesDescription}
+
+ )}
{featuredStories.map(story => (
{
setFavoritesSelected(true);
@@ -47,9 +48,7 @@ function LibraryScreen() {
author={item.author_name}
authorImage={item.author_image}
excerpt={item.excerpt}
- tags={item.genre_medium
- .concat(item.tone)
- .concat(item.topic)}
+ tags={item.genre_medium.concat(item.tone).concat(item.topic)}
pressFunction={() =>
router.push({
pathname: '/story',
@@ -59,13 +58,21 @@ function LibraryScreen() {
/>
);
- }
+ };
useEffect(() => {
- setTimeout(() => fetchUserStoriesReadingList(user?.id).then(readingList => {
- setReadingListStories(readingList);
- }), 3000)
- }, [channels])
+ if (updateReadingListTimeout) {
+ clearTimeout(updateReadingListTimeout);
+ }
+
+ updateReadingListTimeout = setTimeout(
+ () =>
+ fetchUserStoriesReadingList(user?.id).then(readingList => {
+ setReadingListStories(readingList);
+ }),
+ 5000,
+ );
+ }, [channels]);
useEffect(() => {
(async () => {
@@ -117,40 +124,32 @@ function LibraryScreen() {
{favoritesSelected &&
- (
- favoriteStories.length > 0 ? (
-
- ) : (
-
-
- Favorited stories
-
-
- will appear here.
-
- )
- )}
+ (favoriteStories.length > 0 ? (
+
+ ) : (
+
+
+ Favorited stories
+
+
+ will appear here.
+
+
+ ))}
{readingSelected &&
- (
- readingListStories.length > 0 ? (
-
- ) : (
-
-
- Saved stories
-
-
- will appear here.
-
- )
- )}
+ (readingListStories.length > 0 ? (
+
+ ) : (
+
+
+ Saved stories
+
+
+ will appear here.
+
+
+ ))}
);
diff --git a/src/components/LibraryHeader/LibraryHeader.tsx b/src/components/LibraryHeader/LibraryHeader.tsx
index efba7f3..e9e4a19 100644
--- a/src/components/LibraryHeader/LibraryHeader.tsx
+++ b/src/components/LibraryHeader/LibraryHeader.tsx
@@ -16,8 +16,7 @@ export default function LibraryHeader() {
{user?.user_metadata.username}
diff --git a/src/queries/savedStories.tsx b/src/queries/savedStories.tsx
index 9decdc6..5ab847d 100644
--- a/src/queries/savedStories.tsx
+++ b/src/queries/savedStories.tsx
@@ -12,7 +12,7 @@ async function fetchUserStories(
) {
let { data, error } = await supabase.rpc('get_saved_stories_for_user', {
user_id_string: user_id,
- saved_list_name: name
+ saved_list_name: name,
});
if (error) {