1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/src/hooks/useThemes.ts

17 lines
340 B
TypeScript
Raw Normal View History

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
};
}