mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
26 lines
745 B
TypeScript
26 lines
745 B
TypeScript
import React, { type FC } from 'react';
|
|
|
|
import { useUserSettings } from 'hooks/useUserSettings';
|
|
import { useBrandingOptions } from 'apps/dashboard/features/branding/api/useBrandingOptions';
|
|
|
|
const CustomCss: FC = () => {
|
|
const { data: brandingOptions } = useBrandingOptions();
|
|
const { customCss: userCustomCss, disableCustomCss } = useUserSettings();
|
|
|
|
return (
|
|
<>
|
|
{!disableCustomCss && brandingOptions?.CustomCss && (
|
|
<style>
|
|
{brandingOptions.CustomCss}
|
|
</style>
|
|
)}
|
|
{userCustomCss && (
|
|
<style>
|
|
{userCustomCss}
|
|
</style>
|
|
)}
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default CustomCss;
|