/
nayvok
/
livecoding
Обзор
Документация
Войти
/
nayvok
/
livecoding
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
frontend/src/context/useSession.ts
13 строк
326 B
nayvok
fix: harden sessions and WebRTC recovery
17 июн 2026, 22:02
17 июн 2026, 22:02
37b9a92
Код
Авторство
О чём код?
import { useContext } from 'react' import { SessionContext, type SessionContextValue, } from '@/context/sessionContextValue' export function useSession(): SessionContextValue { const ctx = useContext(SessionContext) if (!ctx) { throw new Error('useSession must be used within SessionProvider') } return ctx }