mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 21:06:04 +00:00
public commit
This commit is contained in:
22
app/src/ui/container/use-flows.ts
Normal file
22
app/src/ui/container/use-flows.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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]
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user