16 lines
316 B
TypeScript
16 lines
316 B
TypeScript
'use client'
|
|
|
|
import { createContext, useContext } from 'react'
|
|
|
|
export interface ConnectingFrom {
|
|
nodeId: string
|
|
handleId: string
|
|
handleType: string
|
|
}
|
|
|
|
export const ConnectionContext = createContext<ConnectingFrom | null>(null)
|
|
|
|
export function useConnectionState() {
|
|
return useContext(ConnectionContext)
|
|
}
|