mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
16 lines
340 B
TypeScript
16 lines
340 B
TypeScript
import { useMemo } from 'react';
|
|
|
|
import { useWebConfig } from './useWebConfig';
|
|
|
|
export function useThemes() {
|
|
const { themes } = useWebConfig();
|
|
|
|
const defaultTheme = useMemo(() => {
|
|
return themes?.find(theme => theme.default);
|
|
}, [ themes ]);
|
|
|
|
return {
|
|
themes: themes || [],
|
|
defaultTheme
|
|
};
|
|
}
|