feat: add subscription section to settings page
Added subscription management section to user settings page: Changes: - Added "Subscription & Usage" card to settings page - Embedded UsageDisplay component (compact mode) - Added "Manage Plan" button linking to /[locale]/subscription - Added "View Subscription Details" text button - Imported CardMembership icon for visual consistency User Experience: - Users can now view their subscription status directly in settings - Shows tier badge (Free/Premium) - Displays usage progress bar for free users - Shows remaining conversations and reset date - Quick access to full subscription management page Location: app/[locale]/settings/page.tsx:253-289 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -30,8 +30,11 @@ import {
|
|||||||
Notifications,
|
Notifications,
|
||||||
Security,
|
Security,
|
||||||
Save,
|
Save,
|
||||||
MenuBook
|
MenuBook,
|
||||||
|
CardMembership
|
||||||
} from '@mui/icons-material'
|
} from '@mui/icons-material'
|
||||||
|
import UsageDisplay from '@/components/subscription/usage-display'
|
||||||
|
import Link from 'next/link'
|
||||||
|
|
||||||
export default function SettingsPage() {
|
export default function SettingsPage() {
|
||||||
const { user } = useAuth()
|
const { user } = useAuth()
|
||||||
@@ -247,6 +250,44 @@ export default function SettingsPage() {
|
|||||||
</Card>
|
</Card>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
{/* Subscription & Usage */}
|
||||||
|
<Box sx={{ flex: '1 1 100%' }}>
|
||||||
|
<Card variant="outlined">
|
||||||
|
<CardContent>
|
||||||
|
<Box display="flex" alignItems="center" justifyContent="space-between" mb={3}>
|
||||||
|
<Box display="flex" alignItems="center">
|
||||||
|
<CardMembership sx={{ mr: 1, color: 'primary.main' }} />
|
||||||
|
<Typography variant="h6">
|
||||||
|
Subscription & Usage
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
<Button
|
||||||
|
variant="outlined"
|
||||||
|
size="small"
|
||||||
|
component={Link}
|
||||||
|
href={`/${locale}/subscription`}
|
||||||
|
>
|
||||||
|
Manage Plan
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
<UsageDisplay compact={true} showUpgradeButton={false} />
|
||||||
|
|
||||||
|
<Box mt={2}>
|
||||||
|
<Button
|
||||||
|
variant="text"
|
||||||
|
size="small"
|
||||||
|
component={Link}
|
||||||
|
href={`/${locale}/subscription`}
|
||||||
|
fullWidth
|
||||||
|
>
|
||||||
|
View Subscription Details
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</Box>
|
||||||
|
|
||||||
{/* Bible Preferences */}
|
{/* Bible Preferences */}
|
||||||
<Box sx={{ flex: '1 1 100%' }}>
|
<Box sx={{ flex: '1 1 100%' }}>
|
||||||
<Card variant="outlined">
|
<Card variant="outlined">
|
||||||
|
|||||||
Reference in New Issue
Block a user