Skip to content

Commit

Permalink
fixed small error
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Hernandez committed Apr 20, 2024
1 parent 31fc823 commit a81751d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/app/(tabs)/author/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as cheerio from 'cheerio';
import { useLocalSearchParams, router } from 'expo-router';
import { decode } from 'html-entities';
import { useEffect, useState } from 'react';
import { ActivityIndicator, ScrollView, View, Text, Image } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
Expand All @@ -14,7 +14,6 @@ import {
} from '../../../queries/authors';
import { Author, StoryPreview } from '../../../queries/types';
import globalStyles from '../../../styles/globalStyles';
import * as cheerio from 'cheerio';

function AuthorScreen() {
const [authorInfo, setAuthorInfo] = useState<Author>();
Expand Down Expand Up @@ -59,7 +58,7 @@ function AuthorScreen() {
) : (
<ScrollView
showsVerticalScrollIndicator={false}
bounces={true}
bounces
contentContainerStyle={{ paddingHorizontal: 8 }}
>
<BackButton pressFunction={() => router.back()} />
Expand Down
1 change: 0 additions & 1 deletion src/app/(tabs)/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ function HomeScreen() {
<View style={{ marginRight: 24 }}>
{featuredStories.map(story => (
<PreviewCard
id={story.id}
key={story.id}
storyId={story.id}
title={story.title}
Expand Down
4 changes: 1 addition & 3 deletions src/components/PreviewCard/PreviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const placeholderImage =
'https://gwn-uploads.s3.amazonaws.com/wp-content/uploads/2021/10/10120952/Girls-Write-Now-logo-avatar.png';

type PreviewCardProps = {
id: number;
title: string;
image: string;
storyId: number;
Expand All @@ -32,7 +31,6 @@ type PreviewCardProps = {
};

function PreviewCard({
id,
title,
image,
storyId,
Expand All @@ -45,7 +43,7 @@ function PreviewCard({
const [reactions, setReactions] = useState<Reactions[]>();
useEffect(() => {
(async () => {
const temp = await fetchAllReactionsToStory(id);
const temp = await fetchAllReactionsToStory(storyId);
if (temp != null) {
setReactions(temp);
return;
Expand Down

0 comments on commit a81751d

Please sign in to comment.