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
2024-05-23 10:18:42 -04:00

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