From 6730fcc643818dd978315c791c2930cb5e92cd27 Mon Sep 17 00:00:00 2001 From: Andreas Petersen Date: Fri, 20 Oct 2023 15:47:54 +0200 Subject: [PATCH] Fix code smells --- src/components/forms/recipe/RecipeForm.tsx | 5 ++++- src/components/forms/recipe/UpdateRecipeForm.tsx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/forms/recipe/RecipeForm.tsx b/src/components/forms/recipe/RecipeForm.tsx index a1ee2e13..63f1871c 100644 --- a/src/components/forms/recipe/RecipeForm.tsx +++ b/src/components/forms/recipe/RecipeForm.tsx @@ -29,7 +29,10 @@ interface RecipeFormProps { onSubmit: (data: RecipeFormInput) => Promise; } -export function RecipeForm({ initialData, onSubmit }: RecipeFormProps) { +export function RecipeForm({ + initialData, + onSubmit, +}: Readonly) { const [isPending, startTransition] = React.useTransition(); // react-hook-form diff --git a/src/components/forms/recipe/UpdateRecipeForm.tsx b/src/components/forms/recipe/UpdateRecipeForm.tsx index 4b92c093..8d98ac7b 100644 --- a/src/components/forms/recipe/UpdateRecipeForm.tsx +++ b/src/components/forms/recipe/UpdateRecipeForm.tsx @@ -20,7 +20,7 @@ interface EditRecipeFormProps { export function EditRecipeForm({ recipeId, initialRecipe, -}: EditRecipeFormProps) { +}: Readonly) { const router = useRouter(); const recipeQuery = trpc.recipe.getRecipe.useQuery(