Problem Statement
Both NoteDetailPage.jsx and NoteCard.jsx currently delete a note using the browser's native window.confirm("Are you sure you want to delete this note?"). This is a jarring, unstyled system popup that breaks out of ThinkBoard's UI entirely — it doesn't match the app's theme (light/dark mode, Tailwind styling), can't be customized, and is inconsistent with the direction the app is already heading. Deleting a note — a destructive, irreversible action — deserves better UX than a generic browser alert.
Proposed Solution
Add a reusable ConfirmModal component (styled with Tailwind, respecting the app's dark/light theme) that:
- Shows the note title being deleted for clarity ("Delete 'Grocery List'?")
- Has clearly labeled "Cancel" and "Delete" buttons (Delete styled in destructive red)
- Closes on outside click / Escape key
- Replaces the window.confirm(...) calls in both NoteDetailPage.jsx and NoteCard.jsx
Affected Area
Problem
StatementBoth NoteDetailPage.jsx and NoteCard.jsx currently delete a note using the browser's native window.confirm("Are you sure you want to delete this note?"). This is a jarring, unstyled system popup that breaks out of ThinkBoard's UI entirely — it doesn't match the app's theme (light/dark mode, Tailwind styling), can't be customized, and is inconsistent with the direction the app is already heading. Deleting a note — a destructive, irreversible action — deserves better UX than a generic browser alert.
Proposed Solution
Add a reusable ConfirmModal component (styled with Tailwind, respecting the app's dark/light theme) that:
Affected Area