mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-23 01:20:30 +02:00
32 lines
782 B
TypeScript
32 lines
782 B
TypeScript
import {createContext} from "react"
|
|
|
|
export interface LockNavigationContextType {
|
|
isLocked: boolean
|
|
lock: () => void
|
|
release: () => void
|
|
navigate: (path: string) => void
|
|
handleAnchorClick: (event: React.MouseEvent<HTMLAnchorElement>) => void
|
|
showDialog: () => Promise<void>
|
|
}
|
|
|
|
const LockNavigationContext = createContext<LockNavigationContextType>({
|
|
isLocked: false,
|
|
lock: () => {
|
|
throw new Error("lock() not implemented")
|
|
},
|
|
release: () => {
|
|
throw new Error("release() not implemented")
|
|
},
|
|
navigate: () => {
|
|
throw new Error("navigate() not implemented")
|
|
},
|
|
handleAnchorClick: () => {
|
|
throw new Error("handleAnchorClick() not implemented")
|
|
},
|
|
showDialog: () => {
|
|
throw new Error("showDialog() not implemented")
|
|
},
|
|
})
|
|
|
|
export default LockNavigationContext
|