fix: move PIN warning banner to authenticated layout for all pages
Some checks failed
CI / ci (pull_request) Failing after 26s
CI / e2e (pull_request) Has been skipped

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ryan
2026-04-05 19:51:39 +00:00
parent 96d2a966d7
commit 3f9e125412
2 changed files with 22 additions and 20 deletions

View File

@@ -12,8 +12,7 @@ import { Label } from '@/components/ui/label'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
import { Separator } from '@/components/ui/separator'
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs'
import { Alert, AlertTitle, AlertDescription } from '@/components/ui/alert'
import { Sun, Moon, Monitor, AlertTriangle } from 'lucide-react'
import { Sun, Moon, Monitor } from 'lucide-react'
import { toast } from 'sonner'
import { AvatarUpload } from '@/components/shared/avatar-upload'
@@ -53,23 +52,6 @@ function ProfilePage() {
<div className="space-y-6 max-w-2xl">
<h1 className="text-2xl font-bold">Profile</h1>
{profile && !profile.hasPin && (
<Alert>
<AlertTriangle className="h-4 w-4" />
<AlertTitle>POS PIN not set</AlertTitle>
<AlertDescription>
You need a PIN to use the Point of Sale.{' '}
<Link
to="/profile"
search={{ tab: 'security' }}
className="underline font-medium text-foreground"
>
Set your PIN
</Link>
</AlertDescription>
</Alert>
)}
<Tabs defaultValue={tab === 'security' || tab === 'appearance' ? tab : 'account'}>
<TabsList>
<TabsTrigger value="account">Account</TabsTrigger>