fix: correct localStorage token name from 'token' to 'authToken'
Fixed authentication token inconsistency in subscription pages:
Issue:
- Subscription pages were using localStorage.getItem('token')
- Rest of the app uses localStorage.getItem('authToken')
- This caused users to be redirected to login when accessing subscription pages
Files Fixed:
- app/[locale]/subscription/page.tsx
* fetchUserData() function
* handleUpgrade() function
* handleManageSubscription() function
- app/[locale]/subscription/success/page.tsx
* SuccessContent component verification
- components/subscription/usage-display.tsx
* fetchUsageData() function
Result:
- Users can now access subscription pages when logged in
- Consistent authentication token naming across entire app
- No more unwanted redirects to login page
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,7 @@ export default function UsageDisplay({ compact = false, showUpgradeButton = true
|
||||
|
||||
const fetchUsageData = async () => {
|
||||
try {
|
||||
const token = localStorage.getItem('token')
|
||||
const token = localStorage.getItem('authToken')
|
||||
if (!token) {
|
||||
setError(true)
|
||||
setLoading(false)
|
||||
|
||||
Reference in New Issue
Block a user