From 1ded7331ef8e41ffd70e59be299627e6729765aa Mon Sep 17 00:00:00 2001 From: Jesse Brault Date: Thu, 8 Aug 2024 10:44:04 -0500 Subject: [PATCH] Added any type to queryFn param in Recipes. --- src/pages/recipes/Recipes.tsx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/pages/recipes/Recipes.tsx b/src/pages/recipes/Recipes.tsx index 5223451..d9a7086 100644 --- a/src/pages/recipes/Recipes.tsx +++ b/src/pages/recipes/Recipes.tsx @@ -38,7 +38,8 @@ const Recipes = () => { recipeInfoView.mainImage.owner.username, recipeInfoView.mainImage.filename ], - queryFn: async ({ signal }) => { + queryFn: async ({ signal }: any) => { + // any needed in the params const imgUrl = await getImage({ accessToken: token, signal, @@ -78,20 +79,11 @@ const Recipes = () => { ownerUsername={view.ownerUsername} slug={view.slug} mainImageUrl={ - slugsAndImgUrls.find( - ({ data: slugAndImgUrl }) => { - return ( - slugAndImgUrl !== undefined && - slugAndImgUrl.slug === view.slug - ) - } - )?.data!.imgUrl ?? '' // hacky workaround. should pass a kind of child which loads its own data - } - mainImageAlt={ - view.mainImage.alt - ? view.mainImage.alt - : undefined + slugsAndImgUrls.find(({ data: slugAndImgUrl }) => { + return slugAndImgUrl !== undefined && slugAndImgUrl.slug === view.slug + })?.data!.imgUrl ?? '' // hacky workaround. should pass a kind of child which loads its own data } + mainImageAlt={view.mainImage.alt ? view.mainImage.alt : undefined} starCount={view.starCount} isPublic={view.isPublic} />