Preparing search index...

    Function useValidationWorkflow

    • Custom hook for managing bulk import validation workflow

      Handles the complete validation lifecycle including:

      • Initialization and analysis of imported recipes
      • Review phase where user validates all items inline
      • Final recipe import to database

      Parameters

      • selectedRecipes: ConvertedImportRecipe[]

        Recipes to validate and import

      • addMultipleRecipes: (recipes: RecipeDraft[]) => Promise<void>

        Database function to save recipes

      • defaultPersons: number

        User's default serving count to apply to all imported recipes

      • findSimilarTags: (name: string) => tagTableElement[]

        Function to find similar tags by name (from RecipeDatabase)

      • findSimilarIngredients: (name: string) => ingredientTableElement[]

        Function to find similar ingredients by name (from RecipeDatabase)

      • OptionalonImportComplete: (importedSourceUrls: string[]) => void | Promise<void>

        Optional async callback called after successful import with source URLs

      Returns UseValidationWorkflowReturn

      Workflow state and handlers