Skip to content

Commit

Permalink
feat: finished comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisParedes1 committed Nov 12, 2023
1 parent c1912e5 commit 127ad70
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/screens/feed/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export const Feed = () => {

// Corrected renderItem function
const renderItem = ({ item, index }: { item: Snap; index: number }) => {
// Render the item only if its index is within the current renderCount
console.log(`renderItem: ${index}: ${renderCount}`);
// // Render the item only if its index is within the current renderCount
// console.log(`renderItem: ${index}: ${renderCount}`);
if (index < renderCount) {
return (
<Card
Expand All @@ -55,7 +55,7 @@ export const Feed = () => {
setRenderCount(renderCount + INCREMENT_RENDER);
}

console.log(`handleEndReached after: ${renderCount}`);
// console.log(`handleEndReached after: ${renderCount}`);
};

if (isError) {
Expand Down
12 changes: 7 additions & 5 deletions src/screens/feed/snap-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ export const SnapView = ({ snap }: { snap: Snap }) => {
});

return (
<View>
<Card snap={snap} client={client} />
<CommentInput snap={snap} />
<Comments snap={snap} client={client}></Comments>
</View>
<>
<View>
<Card snap={snap} client={client} />
<CommentInput snap={snap} />
</View>
<Comments snap={snap} client={client} />
</>
);
};

0 comments on commit 127ad70

Please sign in to comment.