mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
23 lines
430 B
TypeScript
23 lines
430 B
TypeScript
import { useBknd } from "../client/BkndProvider";
|
|
|
|
/** @deprecated */
|
|
export function useFlows() {
|
|
const { app } = useBknd();
|
|
|
|
return {
|
|
flows: app.flows,
|
|
config: app.config.flows,
|
|
};
|
|
}
|
|
|
|
/** @deprecated */
|
|
export function useFlow(name: string) {
|
|
const { app } = useBknd();
|
|
const flow = app.flows.find((f) => f.name === name);
|
|
|
|
return {
|
|
flow: flow!,
|
|
config: app.config.flows[name],
|
|
};
|
|
}
|