Skip to content

Add routing, an admin guard, and an empty state #63

Description

@Kaushik4141

The app has no router today. App.tsx:97-102 treats any non-/ path segment as an item slug, so /admin would be looked up as an item literally named "admin" — the single easiest thing to get wrong in this work.

  • Add react-router-dom and lift the existing screen-state machine into routes, keeping /:slug as the QR deep-link
  • Make the slug branch skip reserved prefixes
  • Add an <AdminRoute> guard backed by GET /api/v1/user/me

Empty state

  • With zero items seeded, ProgressScreen renders a zero-length grid and the flow silently dead-ends — which is exactly what every fresh deployer sees first. Show "No {itemNamePlural} have been added yet", linking to /admin when the viewer is an admin.

Blocked by the admin API issue.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockerBlocks other work; land this firstenhancementNew feature or requestfrontendReact / web app

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions