mirror of
https://github.com/reconurge/flowsint.git
synced 2026-04-27 18:01:58 -05:00
feat(app): enricher template feature flag
This commit is contained in:
@@ -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} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user