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

@@ -15,9 +15,9 @@ import { InfoModal } from '../../Misc/InfoModal';
import { SupportMe } from '../../Misc/SupportMe';
import { H2, Paragraph } from '../../Misc/TextComponents';
import LayoutOptions from './LayoutOptions';
import { useFullscreen } from '../../../Hooks/useFullscreen';
import { Spacer } from '../../Misc/Spacer';
import { usePlayers } from '../../../Hooks/usePlayers';
import { useGlobalSettings } from '../../../Hooks/useGlobalSettings';
const MainWrapper = styled.div`
width: 100dvw;
@@ -124,7 +124,7 @@ const Start = ({
);
const [wakeLockActive, setWakeLockActive] = useState(true);
const { enableFullscreen } = useFullscreen();
const { enableFullscreen } = useGlobalSettings();
const toggleWakeLock = () => {
if (wakeLock.active && wakeLockActive) {