Repository navigation
fix: remove duplicate Create New Quiz modal on dashboard - #181
Open
lb1192176991-lab wants to merge 1 commit into
Open
lb1192176991-lab wants to merge 1 commit into
lb1192176991-lab wants to merge 1 commit into
Conversation
This was referenced Oct 21, 2026
TheCodeHeist-Coder
self-requested a review
October 21, 2026 19:49
TheCodeHeist-Coder
approved these changes
Oct 21, 2026
Owner
|
@lb1192176991-lab Hii! There is some merge conflicts in main. So it's better to resolve these rather than a force pushed. When these resolved, i'll merge it . |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Removes the leftover duplicate "Create New Quiz" modal on the dashboard. There were two complete modals, both mounted under the same
showCreatecondition and both atz-50, with the second painting over the first. The first was missing therequiredtitle input and thedisabledsubmit button, so the visible modal appeared to enforce validation the hidden one did not.What
required/disabled, no description field).requiredto its title input.disabled={!newTitle.trim() || titleLoading}, so a second click while the request is in flight cannot create a second quiz.Dashboard.test.tsxcovering all three acceptance criteria.Why
Fixes #179. Two live forms bound to the same handler and the same state made it possible to create a quiz twice, and the hidden modal's missing validation undermined the visible one. Mostly deletion, plus the two attribute guards.
Testing
npx vitest run src/screens/Dashboard.test.tsx— 3/3 pass (one modal in DOM, empty title prevented, double-submit prevented).npx tsc -b— clean.npx eslint src/screens/Dashboard.tsx src/screens/Dashboard.test.tsx— new test file clean;Dashboard.tsxshows 4no-explicit-anyerrors on untouched lines that pre-exist onmain(lines 12/152/207).npx vitest run— 33 passed, 1 failed (JoinQuiz.test.tsx); verified the failure exists on cleanmainwithout these changes.Related issue
Closes #179
Type of change
Which services does this touch?
apps/frontendHow did you test this?
Ran the commands above locally on Windows (Node 20, pnpm 10). No visual change beyond one modal instead of two; no screenshot needed.
Checklist
pnpm run lint(ran scopedeslinton the changed files instead — see Testing)pnpm run check-types(equivalenttsc -bin apps/frontend)pnpm run builddocker-compose up.envfile, API key or other secretFirst pull request here? Unticked checkboxes reflect what I could not run on this machine (Docker/full build); happy to run anything else you'd like.