stremio-web/src/common/Fullscreen/useFullscreen.ts
AK 60df6860d7 feat(common): add FullscreenProvider + context module
Introduce a single, app-root-owned source of truth for fullscreen state,
mirroring the existing provider pattern (ToastProvider, FileDropProvider).
The provider centralizes the fullscreenchange / win-visibility-changed /
keydown listeners and exposes the same [fullscreen, requestFullscreen,
exitFullscreen, toggleFullscreen] tuple that consumers already destructure.

Not yet wired up - both the legacy src/common/useFullscreen hook and the
new module coexist. Subsequent commits mount the provider in App.js and
switch consumers over.

Made-with: Cursor
2026-04-27 01:50:14 -04:00

8 lines
229 B
TypeScript

// Copyright (C) 2017-2023 Smart code 203358507
import { useContext } from 'react';
import FullscreenContext from './FullscreenContext';
const useFullscreen = () => useContext(FullscreenContext);
export default useFullscreen;