From 0d5bcf3da3b1f10788b8a9abf8d93b68debed0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Duv=C3=A1n=20Merch=C3=A1n?= Date: Thu, 20 Oct 2022 09:15:07 -0500 Subject: [PATCH] arrreglando roblema autor --- client/src/components/recipes/detailrecipe/detailrecipe.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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()
Health Score
  • {recipe.healthScore}
  • - {isLogged?<> + {recipe.apiId? null : isLogged?<>
    Created by {author}
    :null}