mirror of
https://github.com/langgenius/dify.git
synced 2026-03-27 17:19:55 +08:00
14 lines
359 B
TypeScript
14 lines
359 B
TypeScript
import { parseAsStringLiteral } from 'nuqs'
|
|
import { ViewType } from '@/app/components/workflow/types'
|
|
|
|
const VIEW_TYPES = Object.values(ViewType)
|
|
|
|
export const parseAsViewType = parseAsStringLiteral(VIEW_TYPES)
|
|
.withDefault(ViewType.graph)
|
|
.withOptions({
|
|
history: 'push',
|
|
clearOnDefault: true,
|
|
})
|
|
|
|
export const WORKFLOW_VIEW_PARAM_KEY = 'view'
|