Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add error and success messages on edit page (#227)
* add notifications for loading, success and error replace the error handling with useStates for error and success and conditional Alert component. * put notification handling in a separate file - less code is needed in the components to use notifications for loading/success/error. - notifications will be consistent across the app and style/settings can be easily changed in one place. - a tsx file was needed to have the Icon component in the notifications. -> src/lib/notifications.tsx * refactor layout to have buttons up top and sticky * edit some spacing * remove DeleteRecipeButton component its now handled inline in the EditRecipeForm component * remove DeleteRecipeButton and title there now rendered in the EditRecipeForm component instead * add buttons with text for larger screens and change title placement + content ({recipe.title} instead of "Edit Recipe") * refactor sticky element slightly - zIndex:1000 made it appear on top of dropdowns/drawers -> zIndex:100 - small edit of margins * integrate modals for recipe deletion confirmation * increase notification auto-close duration to 2s * fix singular/plural typo --------- Co-authored-by: sirisayshello <[email protected]>
- Loading branch information