2026-02-14 17:38:28 +09:00
|
|
|
import { lazy, Suspense } from 'react';
|
2026-02-14 13:25:11 +09:00
|
|
|
import { useParams } from 'react-router';
|
|
|
|
|
|
2026-02-14 17:38:28 +09:00
|
|
|
const CONTENT_MAP: Record<string, React.LazyExoticComponent<React.ComponentType>> = {
|
|
|
|
|
'env-intro': lazy(() => import('../content/DevEnvIntro')),
|
|
|
|
|
'initial-setup': lazy(() => import('../content/InitialSetup')),
|
|
|
|
|
'gitea-usage': lazy(() => import('../content/GiteaUsage')),
|
|
|
|
|
'nexus-usage': lazy(() => import('../content/NexusUsage')),
|
|
|
|
|
'git-workflow': lazy(() => import('../content/GitWorkflow')),
|
|
|
|
|
'chat-bot': lazy(() => import('../content/ChatBotIntegration')),
|
|
|
|
|
'starting-project': lazy(() => import('../content/StartingProject')),
|
|
|
|
|
'design-system': lazy(() => import('../content/DesignSystem')),
|
2026-02-14 13:25:11 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export function GuidePage() {
|
|
|
|
|
const { section } = useParams<{ section: string }>();
|
2026-02-14 17:38:28 +09:00
|
|
|
const Content = section ? CONTENT_MAP[section] : null;
|
2026-02-14 13:25:11 +09:00
|
|
|
|
2026-02-14 17:38:28 +09:00
|
|
|
if (!Content) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="max-w-4xl mx-auto py-12 px-6">
|
|
|
|
|
<h1 className="text-3xl font-bold text-text-primary mb-4">페이지를 찾을 수 없습니다</h1>
|
|
|
|
|
<p className="text-text-secondary">요청한 가이드 섹션이 존재하지 않습니다.</p>
|
2026-02-14 13:25:11 +09:00
|
|
|
</div>
|
2026-02-14 17:38:28 +09:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Suspense
|
|
|
|
|
fallback={
|
|
|
|
|
<div className="flex items-center justify-center py-20">
|
|
|
|
|
<div className="animate-spin h-6 w-6 border-3 border-accent border-t-transparent rounded-full" />
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
<Content />
|
|
|
|
|
</Suspense>
|
2026-02-14 13:25:11 +09:00
|
|
|
);
|
|
|
|
|
}
|