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.
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.