mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Update to React 18
This commit is contained in:
parent
b5d6e37fb3
commit
be891c3a98
36 changed files with 339 additions and 311 deletions
|
@ -1,4 +1,4 @@
|
|||
import React, { createContext, FC, useContext, useEffect, useState } from 'react';
|
||||
import React, { type FC, type PropsWithChildren, createContext, useContext, useEffect, useState } from 'react';
|
||||
|
||||
import type { WebConfig } from '../types/webConfig';
|
||||
import defaultConfig from '../config.json';
|
||||
|
@ -7,7 +7,7 @@ import fetchLocal from '../utils/fetchLocal';
|
|||
export const WebConfigContext = createContext<WebConfig>(defaultConfig);
|
||||
export const useWebConfig = () => useContext(WebConfigContext);
|
||||
|
||||
export const WebConfigProvider: FC = ({ children }) => {
|
||||
export const WebConfigProvider: FC<PropsWithChildren<unknown>> = ({ children }) => {
|
||||
const [ config, setConfig ] = useState<WebConfig>(defaultConfig);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue