mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
@@ -0,0 +1,66 @@
|
||||
// ─── pages/Suspended.jsx ──────────────────────────────────────────────────────
|
||||
import { useLocation, Link } from 'react-router-dom'
|
||||
import { ShieldBan } from 'lucide-react'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { useDateFormat } from '@/hooks/useDateFormat'
|
||||
|
||||
export default function Suspended() {
|
||||
const { state } = useLocation()
|
||||
const { fmtDateTime } = useDateFormat()
|
||||
|
||||
const reason = state?.reason ?? null
|
||||
const banType = state?.ban_type ?? null
|
||||
const banExpiresAt = state?.ban_expires_at ?? null
|
||||
|
||||
const expiryText = banExpiresAt ? fmtDateTime(banExpiresAt) : null
|
||||
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-muted/40 px-4">
|
||||
<div className="flex flex-col items-center text-center gap-6 max-w-md w-full">
|
||||
|
||||
<div className="flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10">
|
||||
<ShieldBan className="size-8 text-destructive" />
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<h1 className="text-2xl font-semibold tracking-tight">Account Suspended</h1>
|
||||
<p className="text-muted-foreground text-sm text-balance">
|
||||
Your account has been suspended and you cannot access the platform at this time.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{(reason || expiryText) && (
|
||||
<div className="w-full rounded-lg border bg-card p-4 text-left flex flex-col gap-3">
|
||||
{reason && (
|
||||
<div>
|
||||
<p className="text-xs text-muted-foreground uppercase tracking-wide font-medium mb-0.5">Reason</p>
|
||||
<p className="text-sm">{reason}</p>
|
||||
</div>
|
||||
)}
|
||||
{banType === 'temporary' && expiryText && (
|
||||
<div>
|
||||
<p className="text-xs text-muted-foreground uppercase tracking-wide font-medium mb-0.5">Suspended Until</p>
|
||||
<p className="text-sm">{expiryText}</p>
|
||||
</div>
|
||||
)}
|
||||
{banType === 'permanent' && (
|
||||
<div>
|
||||
<p className="text-xs text-muted-foreground uppercase tracking-wide font-medium mb-0.5">Duration</p>
|
||||
<p className="text-sm">Permanent</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<p className="text-sm text-muted-foreground">
|
||||
If you believe this is a mistake, please contact your administrator.
|
||||
</p>
|
||||
|
||||
<Button asChild variant="outline" size="sm">
|
||||
<Link to="/login">Back to Login</Link>
|
||||
</Button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user