feat(app): enricher template feature flag

This commit is contained in:
dextmorgn
2026-02-12 23:52:39 +01:00
parent 6293c90511
commit ad6a31a7ab

View File

@@ -1,13 +1,22 @@
import { createFileRoute, useRouterState } from '@tanstack/react-router'
import { createFileRoute, useRouterState, redirect } from '@tanstack/react-router'
import { TemplateEditor } from '@/components/templates/template-editor'
const FEATURE_FLAG = true
export const Route = createFileRoute('/_auth/dashboard/enrichers/new')({
beforeLoad: async () => {
if (FEATURE_FLAG) {
throw redirect({
to: '/'
})
}
},
component: NewTemplatePage
})
function NewTemplatePage() {
const routerState = useRouterState()
const importedContent = (routerState.location.state as { importedContent?: string })?.importedContent
const importedContent = (routerState.location.state as { importedContent?: string })
?.importedContent
return <TemplateEditor importedYaml={importedContent} />
}