global settings context, provider, hook

This commit is contained in:
Viktor Rådberg
2023-09-22 10:56:46 +02:00
parent 35e21a62fe
commit d7d9d26540
7 changed files with 166 additions and 121 deletions

View File

@@ -0,0 +1,10 @@
import { createContext } from 'react';
export type GlobalSettingsContextType = {
isFullscreen: boolean;
enableFullscreen: () => void;
disableFullscreen: () => void;
};
export const GlobalSettingsContext =
createContext<GlobalSettingsContextType | null>(null);