1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-27 13:49:10 +02:00

feat: add cr plausible context

This commit is contained in:
Thomas Heartman 2024-02-02 16:17:07 +09:00
parent fbb5733f18
commit e04bccace5
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -0,0 +1,15 @@
import { createContext, useContext } from 'react';
const defaultContext = {
willOverwriteStrategyChanges: false,
registerWillOverwriteStrategyChanges: () => {},
};
const ChangeRequestPlausibleContext = createContext(defaultContext);
export const ChangeRequestPlausibleProvider =
ChangeRequestPlausibleContext.Provider;
export const useChangeRequestPlausibleContext = (): typeof defaultContext => {
return useContext(ChangeRequestPlausibleContext);
};