Skip to content

Added ingredients export as list - #39

Open
Kartikay-Mehrotra wants to merge 2 commits into
imkrishnasarathi:mainfrom
Kartikay-Mehrotra:added-export-ingredients
Open

Added ingredients export as list#39
Kartikay-Mehrotra wants to merge 2 commits into
imkrishnasarathi:mainfrom
Kartikay-Mehrotra:added-export-ingredients

Conversation

@Kartikay-Mehrotra

Copy link
Copy Markdown

PR Description

Summary

This PR adds a new feature to the RecipeModal component: the ability to export the ingredients list of a recipe as a .txt file.

Changes

  • Added a new button labeled "Export List" in the modal header.
  • Implemented handleExportIngredients function to generate a text file containing:
    • Recipe name
    • List of ingredients with amounts and units
  • Alerts the user if no ingredients are available.
  • Button uses a green styling to differentiate from other actions.

Motivation

  • Allows users to easily save or share shopping lists for recipes.
  • Enhances usability and complements existing features like Favorite and Cook This.

Notes

  • Ingredients export works only if recipeDetails.ingredients is available.
  • Export uses Blob and triggers a download in the browser.

Hacktoberfest

This PR is intended for Hacktoberfest and is hacktoberfest-accepted.

@vercel

vercel Bot commented Oct 4, 2025

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the krishnathecoder756's projects Team on Vercel.

A member of the Team first needs to authorize it.

@imkrishnasarathi imkrishnasarathi left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Recipe details rendering code was removed and not added back. This makes the modal incomplete.

)}
</>
)}
{/* existing recipeDetails rendering remains as is */}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing recipeDetails was removed from the application

@imkrishnasarathi

Copy link
Copy Markdown
Owner

@Kartikay-Mehrotra let me know once the issues are fixed

@Kartikay-Mehrotra

Copy link
Copy Markdown
Author

Sure , Just busy with some other task . Will update asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants