17 lines
447 B
TypeScript
17 lines
447 B
TypeScript
import { createContext, useContext } from "react";
|
|
|
|
import { DeployConfig } from "@/domain/domain";
|
|
|
|
type DeployEditContext = {
|
|
deploy: DeployConfig;
|
|
error: Record<string, string>;
|
|
setDeploy: (deploy: DeployConfig) => void;
|
|
setError: (error: Record<string, string>) => void;
|
|
};
|
|
|
|
export const Context = createContext<DeployEditContext>({} as DeployEditContext);
|
|
|
|
export const useDeployEditContext = () => {
|
|
return useContext(Context);
|
|
};
|