diff --git a/client/src/components/recipes/detailrecipe/detailrecipe.js b/client/src/components/recipes/detailrecipe/detailrecipe.js index 2576aea..3f7639c 100644 --- a/client/src/components/recipes/detailrecipe/detailrecipe.js +++ b/client/src/components/recipes/detailrecipe/detailrecipe.js @@ -52,7 +52,9 @@ const navigate = useNavigate() }, [rankingTotal]); useEffect(()=>{ if ( Object.entries(recipe).length >0) { - dispatch(getAuthorName(recipe.userId)) + if (!recipe.apiId) { + dispatch(getAuthorName(recipe.userId)) + } } },) function handleUpdate(postId, value) { @@ -117,7 +119,7 @@ const navigate = useNavigate()