15 lines
323 B
TypeScript
15 lines
323 B
TypeScript
"use client";
|
|
|
|
import { createContext } from "react";
|
|
|
|
export type ActionSubmitContextData = {
|
|
listenForComplete: (complete: () => void) => void;
|
|
};
|
|
|
|
export const ActionSubmitContext = createContext<ActionSubmitContextData>({
|
|
listenForComplete: (r) => {
|
|
console.warn("submit context not caught");
|
|
r();
|
|
},
|
|
});
|