diff options
-rw-r--r-- | src/components/moments/MomentPost.tsx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/components/moments/MomentPost.tsx b/src/components/moments/MomentPost.tsx index 7a588325..3b2721a0 100644 --- a/src/components/moments/MomentPost.tsx +++ b/src/components/moments/MomentPost.tsx @@ -34,16 +34,13 @@ const MomentPost: React.FC<MomentPostProps> = ({ const isOwnProfile = username === loggedInUsername; - const loadTags = async () => { - const response = await loadMomentTags(moment.moment_id); - setTags(response ? response : []); - }; - /* * Load tags on initial render to pass tags data to moment header and content */ useEffect(() => { - loadTags(); + loadMomentTags(moment.moment_id).then((response) => { + setTags(response ? response : []); + }); }, []); /* |