fix(web): restore product navigation coverage
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 24s
CD Pipeline / build-and-deploy (push) Successful in 4m52s
CD Pipeline / post-deploy-checks (push) Successful in 58s
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 24s
CD Pipeline / build-and-deploy (push) Successful in 4m52s
CD Pipeline / post-deploy-checks (push) Successful in 58s
This commit is contained in:
@@ -92,15 +92,7 @@ export default function DemoPage({ params }: { params: { locale: string } }) {
|
||||
const tMock = useTranslations('mockData')
|
||||
const tDryRun = useTranslations('dryRun')
|
||||
const locale = params.locale
|
||||
|
||||
// 生產環境保護: 需要 NEXT_PUBLIC_ENABLE_DEMO=true 才能存取
|
||||
if (process.env.NEXT_PUBLIC_ENABLE_DEMO !== 'true') {
|
||||
return (
|
||||
<div className="flex items-center justify-center min-h-screen">
|
||||
<p className="text-muted-foreground">展示頁已在正式環境停用。</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
const demoEnabled = process.env.NEXT_PUBLIC_ENABLE_DEMO === 'true'
|
||||
|
||||
const [_isCreating, setIsCreating] = useState(false)
|
||||
const [createError, setCreateError] = useState<string | null>(null)
|
||||
@@ -153,6 +145,15 @@ export default function DemoPage({ params }: { params: { locale: string } }) {
|
||||
}
|
||||
}, [approvalConfigs, tApproval])
|
||||
|
||||
// 生產環境保護: 需要 NEXT_PUBLIC_ENABLE_DEMO=true 才能存取
|
||||
if (!demoEnabled) {
|
||||
return (
|
||||
<div className="flex items-center justify-center min-h-screen">
|
||||
<p className="text-muted-foreground">{t('disabled')}</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout locale={locale}>
|
||||
<div className="max-w-7xl mx-auto space-y-8">
|
||||
|
||||
Reference in New Issue
Block a user