Preparing search index...

    Function Recipe

    • Recipe Screen Component

      The primary screen component for viewing, editing, and creating recipes in the application. Handles four operational modes with distinct behaviors and validation flows:

      • Read-only mode: Displays recipe details with option to add ingredients to shopping list
      • Edit mode: Enables modification of existing recipe data with change detection
      • Manual add mode: Supports creation of new recipes with manual data entry
      • OCR add mode: Facilitates recipe creation from photos using text recognition

      Key features:

      • Recipe validation with missing field detection
      • Similarity detection to prevent duplicate recipes
      • Automatic recipe scaling based on default persons setting
      • OCR-based field extraction from images
      • Tag and ingredient duplicate checking with fuzzy matching
      • Shopping list integration
      • Image cropping and management
      • Nutritional information tracking

      Parameters

      Returns Element

      The rendered Recipe screen with appropriate mode-specific UI