You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/frontend/src/components/modals/subtitle-tools/ToolContext.ts

15 lines
389 B

import { createContext, useContext } from "react";
export type ProcessSubtitleType = (
action: string,
override?: Partial<FormType.ModifySubtitle>
) => void;
export const ProcessSubtitleContext = createContext<ProcessSubtitleType>(() => {
throw new Error("ProcessSubtitleContext not initialized");
});
export function useProcess() {
return useContext(ProcessSubtitleContext);
}