SPB Git forge

spb/rareindex

Public
54commits 1branches 0releases
7.1 MBsize
maindefault branch
10 days agolast push
TypeScript 61.9% HTML 37.2% SQL 0.7%
1.5 KB · 34 lines tsx
Raw Blame History
1import type { Metadata } from 'next';2import { requireUser } from '@/lib/auth/session';3import { PageHeader, btnSecondary } from '@/components/account/page-header';4import { Card, CardHeader } from '@/components/ui/primitives';5import { DeleteAccountForm } from './delete-form';67export const metadata: Metadata = { title: 'Data & privacy', robots: { index: false } };89export default async function DataPage() {10  await requireUser('/account/data');11  return (12    <>13      <PageHeader title="Data & privacy" description="Your collections are private by default and never sold. Export everything or delete your account at any time." />14      <div className="grid gap-4 lg:grid-cols-2">15        <Card>16          <CardHeader title="Export my data" subtitle="One JSON file: profile, collections, items, watchlists, alerts, saved searches, targets, notifications." />17          <div className="p-4">18            <a href="/api/account/export" className={btnSecondary} download>19              Download JSON export20            </a>21            <p className="mt-3 text-xs text-subtle">Per-collection CSV exports are available on each collection page.</p>22          </div>23        </Card>24        <Card>25          <CardHeader title="Delete account" subtitle="Soft-deleted immediately, permanently purged after 30 days. Signing in during the grace period cancels the deletion." />26          <div className="p-4">27            <DeleteAccountForm />28          </div>29        </Card>30      </div>31    </>32  );33}34