Skip to content

Move SchoolDashboard out of RoleDashboards.tsx #137

Description

@jgupta05072003-code

What this is for

RoleDashboards.tsx is a 3,100+ line file holding all 8 role dashboards. We're moving each one into its own file so the codebase is easier to navigate. This is the smallest dashboard — good place to start.

What to move

export const SchoolDashboard (~96 lines) — the dashboard shown to School/Principal-role users.

Steps

  1. Create frontend/src/components/dashboards/SchoolDashboard.tsx.
  2. Cut the SchoolDashboard component out of RoleDashboards.tsx and paste it into the new file.
  3. Add whatever imports it needs at the top (React, any icons/types it uses — copy the relevant ones from the top of RoleDashboards.tsx).
  4. Keep the export const SchoolDashboard = ... exactly as it was.
  5. Back in RoleDashboards.tsx, where the component used to be, add: export { SchoolDashboard } from './dashboards/SchoolDashboard'; — this way App.tsx doesn't need any changes.
  6. Don't change any logic or JSX — copy it exactly as-is.

How to check your work

  1. cd frontend && npm run lint — no errors.
  2. npm run build — succeeds.
  3. Run npm run dev, log in as a School/Principal user, and confirm the dashboard looks and behaves exactly the same as before.

Part of #136.

Activity

  1. jgupta05072003-code commented on Aug 19, 2026

    @jgupta05072003-code
    CollaboratorAuthor

    Saw PR #229 is already open for this — leaving it with you, not touching it myself.

    Could you get it merge-ready by end of day tomorrow (2026-08-20)? If you hit a blocker, just comment here rather than letting it sit.

  2. vanshikaagrawalcsaiml24 commented on Aug 21, 2026

    @vanshikaagrawalcsaiml24
    Contributor

    @jgupta05072003-code i will be working on this issue

  3. jgupta05072003-code commented on Aug 21, 2026

    @jgupta05072003-code
    CollaboratorAuthor

    Assigning this to Vanshika, who'll be working on it. Same as the other RoleDashboards.tsx extractions — SchoolDashboard split out, verify build + a live click-through before PR.

  4. jgupta05072003-code commented on Aug 21, 2026

    @jgupta05072003-code
    CollaboratorAuthor

    Resolved by PR #259 (merged). Confirmed the vite.config.ts proxy-port fix landed too — all three proxied paths (/api, /output, /worksheets) now consistently point at localhost:3000.

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

Metadata

Metadata

Labels

enhancementNew feature or requestgood first issueGood for newcomersintern-readyMechanical, well-scoped — safe for interns to pick up now

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions