mirror of
https://github.com/morten-olsen/bob-the-algorithm.git
synced 2026-02-08 00:46:25 +01:00
update
This commit is contained in:
15
src/features/planner/context.ts
Normal file
15
src/features/planner/context.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { createContext } from 'react';
|
||||
import { Strategies } from "./algorithm/build-graph";
|
||||
|
||||
type PlannerOptions = {
|
||||
strategy: Strategies;
|
||||
}
|
||||
type PlannerContextValue = {
|
||||
options: PlannerOptions;
|
||||
setOptions: (options: Partial<PlannerOptions>) => void;
|
||||
}
|
||||
|
||||
const PlannerContext = createContext<PlannerContextValue>(undefined as any);
|
||||
|
||||
export type { PlannerContextValue, PlannerOptions };
|
||||
export { PlannerContext };
|
||||
Reference in New Issue
Block a user