mirror of
https://github.com/langgenius/dify.git
synced 2026-02-13 16:00:55 -05:00
12 lines
332 B
TypeScript
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'
|