PlaceholderPage.jsx 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * PlaceholderPage
  3. *
  4. * A small, reusable component to render consistent placeholder pages.
  5. *
  6. * UX rule:
  7. * - All user-facing text must be German.
  8. */
  9. export default function PlaceholderPage({
  10. title,
  11. description,
  12. params,
  13. children,
  14. }) {
  15. return (
  16. <div className="space-y-4">
  17. <div className="space-y-1">
  18. <h1 className="text-2xl font-semibold tracking-tight">{title}</h1>
  19. {description ? (
  20. <p className="text-sm text-muted-foreground">{description}</p>
  21. ) : null}
  22. </div>
  23. <div className="rounded-lg border bg-card p-4 text-card-foreground shadow-sm">
  24. <div className="space-y-3">
  25. <p className="text-sm font-medium">Routenparameter</p>
  26. {params ? (
  27. <pre className="overflow-auto rounded-md bg-muted p-3 text-xs">
  28. {JSON.stringify(params, null, 2)}
  29. </pre>
  30. ) : (
  31. <p className="text-xs text-muted-foreground">
  32. Keine Parameter für diese Route.
  33. </p>
  34. )}
  35. {children ? <div className="pt-2">{children}</div> : null}
  36. </div>
  37. </div>
  38. </div>
  39. );
  40. }