gendesign/.design-sync/previews/RouteGuard.tsx
bot-backend e70f5da82b
All checks were successful
CI / changes (pull_request) Successful in 7s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
chore(design-sync): sync inputs for claude.ai/design trade-in DS
Imports tradein-mvp/frontend (38 components) to a claude.ai/design
design-system project. Synth-entry build (Next.js app, no dist):
- overrides/source-kit.mjs: process.env shim for browser IIFE
- preview-provider.tsx: seeded TanStack Query provider (mirrors the
  repo's offline ui-preview client) so fetch-coupled + auth-gated cards render
- previews/*.tsx: authored preview compositions (real fixture data)
- conventions.md: README header for the design agent
- config.json + NOTES.md: reproducible re-sync inputs
2026-06-27 14:40:50 +03:00

15 lines
758 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { RouteGuard } from 'tradein-mvp-frontend';
/** RBAC-обёртка. useMe() читает /api/v1/me — в превью-окружении сети нет,
* поэтому guard рендерит свой gated-state (NoAccessScreen "Доступа нет" при
* ошибке /me, либо ничего во время загрузки). Fetch-coupled на useMe. */
export const Default = () => (
<RouteGuard>
<div className="card" style={{ padding: 24 }}>
<h2 style={{ margin: 0 }}>Защищённый раздел</h2>
<p style={{ margin: '8px 0 0', color: 'var(--fg-secondary)' }}>
Этот контент виден только при разрешённой роли.
</p>
</div>
</RouteGuard>
);