mirror of
https://github.com/langgenius/dify.git
synced 2026-06-05 15:40:14 +08:00
36e840cd87
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
15 lines
359 B
TypeScript
15 lines
359 B
TypeScript
'use client'
|
|
|
|
import type { IWorkspace } from '@/models/common'
|
|
import { createContext, useContext } from 'use-context-selector'
|
|
|
|
type WorkspacesContextValue = {
|
|
workspaces: IWorkspace[]
|
|
}
|
|
|
|
export const WorkspacesContext = createContext<WorkspacesContextValue>({
|
|
workspaces: [],
|
|
})
|
|
|
|
export const useWorkspacesContext = () => useContext(WorkspacesContext)
|