Skip to content

Temi/Kyle: Subscription Logic & UI Integration #1

@kn-dev-code

Description

@kn-dev-code

Context: Your goal is to move the "Plan: Pro" badge from a static design to a dynamic state.

Feature Logic: Create a useSubscription hook or add an action to useAuth that sends a PATCH request to /user/upgrade.

UI Work: * Update the NavBar to conditionally render the "Plan: Pro" badge based on user.plan === 'pro'.

Fix the TypeScript error in the NavBar: The user object is currently typed as a string, but we need it to be an object so we can access {user.name} without it crashing.

Deliverable: A functional "Upgrade" button that changes the user's plan in the database and reflects immediately in the UI.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions