Files
dify/web/app/components/workflow-app/search-params.ts

12 lines
332 B
TypeScript

import { parseAsStringEnum } from 'nuqs'
import { ViewType } from '@/app/components/workflow/types'
export const parseAsViewType = parseAsStringEnum<ViewType>(Object.values(ViewType))
.withDefault(ViewType.graph)
.withOptions({
history: 'push',
clearOnDefault: true,
})
export const WORKFLOW_VIEW_PARAM_KEY = 'view'