fix(web): gate ghost routes behind ComingSoon placeholder component

- Create ComingSoon.tsx: simple placeholder showing feature name and
  "under development" message with proper Tailwind styling
- Replace LazyGear, LazyLive, LazyEducation, LazyQueue, LazyDeveloper
  route elements with <ComingSoon feature="..." />
- Remove unused lazy imports for ghost components

Users navigating to /gear, /live, /education, /queue, /developer will
now see a clear "Coming Soon" message instead of broken components
that depend on non-existent backend APIs.

Addresses audit finding D5: 5 ghost routes without backend.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
senke 2026-02-11 23:23:26 +01:00
parent 56e91e28f7
commit 2501babba1
2 changed files with 21 additions and 11 deletions

View file

@ -0,0 +1,14 @@
interface ComingSoonProps {
feature: string;
}
export function ComingSoon({ feature }: ComingSoonProps) {
return (
<div className="flex min-h-[60vh] flex-col items-center justify-center gap-4 text-center">
<h1 className="text-3xl font-bold tracking-tight">{feature}</h1>
<p className="max-w-md text-lg text-muted-foreground">
This feature is currently under development and will be available soon.
</p>
</div>
);
}

View file

@ -27,15 +27,11 @@ import {
LazyAdminDashboard,
LazyDesignSystemDemo,
LazySocial,
LazyGear,
LazyLive,
LazyEducation,
LazyQueue,
LazyDeveloper,
LazySellerDashboard,
LazyWishlist,
LazyPurchases,
} from '@/components/ui/LazyComponent';
import { ComingSoon } from '@/components/ui/ComingSoon';
import { PublicRoute } from './PublicRoute';
import { ProtectedLayoutRoute } from './ProtectedLayoutRoute';
import type { RouteEntry } from './types';
@ -96,12 +92,12 @@ export function getProtectedRoutes(): RouteEntry[] {
{ path: '/webhooks', element: wrapProtected(<LazyWebhooks />) },
{ path: '/admin', element: wrapProtected(<LazyAdminDashboard />) },
{ path: '/social', element: wrapProtected(<LazySocial onViewProfile={() => {}} />) },
// PLANNED — no backend yet: frontend-only routes for future features
{ path: '/gear', element: wrapProtected(<LazyGear />) },
{ path: '/live', element: wrapProtected(<LazyLive />) },
{ path: '/education', element: wrapProtected(<LazyEducation />) },
{ path: '/queue', element: wrapProtected(<LazyQueue />) },
{ path: '/developer', element: wrapProtected(<LazyDeveloper />) },
// PLANNED — no backend yet: gated behind ComingSoon placeholder
{ path: '/gear', element: wrapProtected(<ComingSoon feature="Gear" />) },
{ path: '/live', element: wrapProtected(<ComingSoon feature="Live" />) },
{ path: '/education', element: wrapProtected(<ComingSoon feature="Education" />) },
{ path: '/queue', element: wrapProtected(<ComingSoon feature="Queue" />) },
{ path: '/developer', element: wrapProtected(<ComingSoon feature="Developer" />) },
];
}