Skip to content

Refactor/dashboard - #183

Merged
TheCodeHeist-Coder merged 2 commits into
TheCodeHeist-Coder:mainfrom
sutanjoyb:refactor/dashboard
Oct 22, 2026
Merged

TheCodeHeist-Coder merged 2 commits into
TheCodeHeist-Coder:mainfrom
sutanjoyb:refactor/dashboard

Conversation

@sutanjoyb

@sutanjoyb sutanjoyb commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Removes a duplicate, leftover "Create New Quiz" modal from the Dashboard component (apps/frontend/src/screens/Dashboard.tsx). Previously, two redundant modal forms were rendered simultaneously under the same showCreate condition, which caused validation mismatches and potential duplicate quiz creations. This PR cleans up the duplicate block and keeps the fully validated modal implementation.

Related issue

Closes #179

Type of change

  • [✓ ] Bug fix
  • New feature
  • Documentation
  • [ ✓] Refactoring
  • Performance
  • Tests
  • Build / CI / deployment

Which services does this touch?

  • [ ✓] apps/frontend
  • apps/http-server
  • apps/ws-server
  • apps/genAI
  • packages/db (schema or Prisma changes)
  • Docker / CI

How did you test this?

  • Verified by inspecting the DOM / code that toggling the "Create New Quiz" button now renders exactly one modal instance instead of two stacked forms.
  • Verified that creating a quiz with an empty title is properly prevented via button disabling (disabled={!newTitle.trim() || titleLoading}).

Checklist

  • [✓ ] I ran pnpm run lint
  • [ ✓] I ran pnpm run check-types
  • [✓ ] I ran pnpm run build
  • The app still starts with docker-compose up
  • I updated documentation if this changes behaviour or setup
  • [ ✓] I did not commit any .env file, API key or other secret

First pull request here? CONTRIBUTING.md walks through the
whole process, and a checkbox left unticked is not a problem — say so and we
will help.

@TheCodeHeist-Coder TheCodeHeist-Coder 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.

Greate! These small optimizations are really good

@TheCodeHeist-Coder
TheCodeHeist-Coder merged commit 1959d29 into TheCodeHeist-Coder:main Oct 22, 2026
9 checks passed
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.

The dashboard renders two Create New Quiz modals at once

2 participants