Skip to content

Commit

Permalink
Make content card use string[]
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Apr 21, 2024
1 parent b9014d1 commit ba86b45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/ContentCard/ContentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ function ContentCard({
storyId,
pressFunction,
}: ContentCardProps) {
const [reactions, setReactions] = useState<Reactions[]>();
const [reactions, setReactions] = useState<string[]>();

useEffect(() => {
(async () => {
const temp = await fetchAllReactionsToStory(id);
if (temp != null) {
setReactions(temp);
setReactions(temp.map(r => r.reaction));
return;
}

setReactions([]);
})();
}, []);
Expand Down

0 comments on commit ba86b45

Please sign in to comment.