Skip to content

Commit

Permalink
Small merge changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Apr 21, 2024
1 parent 5f80004 commit 6654240
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/app/(tabs)/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
fetchRecommendedStories,
fetchStoryPreviewById,
} from '../../../queries/stories';
import { StoryCard, StoryPreview, Story } from '../../../queries/types';
import { StoryCard, StoryPreview } from '../../../queries/types';
import globalStyles from '../../../styles/globalStyles';
import { useSession } from '../../../utils/AuthContext';

Expand Down Expand Up @@ -96,6 +96,7 @@ function HomeScreen() {
useEffect(() => {
const getRecommendedStories = async () => {
const recentStoryResponse = await getRecentStory();

const recommendedStoriesResponse =
await fetchRecommendedStories(recentStoryResponse);
setRecommendedStories(recommendedStoriesResponse);
Expand Down Expand Up @@ -191,6 +192,7 @@ function HomeScreen() {
{recommendedStories.map(story => (
<ContentCard
id={story.id}
storyId={story.id}
key={story.title}
title={story.title}
author={story.author_name}
Expand All @@ -216,6 +218,7 @@ function HomeScreen() {
{newStories.map(story => (
<ContentCard
id={story.id}
storyId={story.id}
key={story.title}
title={story.title}
author={story.author_name}
Expand Down
2 changes: 1 addition & 1 deletion src/queries/savedStories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export async function isStoryInReadingList(
userId: string | undefined,
): Promise<boolean> {
let { data, error } = await supabase.rpc('is_story_saved_for_user', {
list_name: 'reading list',
list_name: SavedList.READING_LIST,
story_db_id: storyId,
user_uuid: userId,
});
Expand Down

0 comments on commit 6654240

Please sign in to comment.