mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-18 06:24:25 +01:00
fix: types
This commit is contained in:
@@ -124,12 +124,12 @@ const [config, setConfig] = createRoot(() =>
|
|||||||
const useConfig = (): UseConfig => {
|
const useConfig = (): UseConfig => {
|
||||||
const i18n = useTranslation();
|
const i18n = useTranslation();
|
||||||
|
|
||||||
const getColorTheme = (): ColorTheme | null => {
|
const getColorTheme = (): ColorTheme => {
|
||||||
const colorThemeConfig = config.colorTheme;
|
const colorThemeConfig = config.colorTheme;
|
||||||
if (colorThemeConfig.type === 'specific' && colorThemes[colorThemeConfig.id] != null) {
|
if (colorThemeConfig.type === 'specific' && colorThemes[colorThemeConfig.id] != null) {
|
||||||
return colorThemes[colorThemeConfig.id];
|
return colorThemes[colorThemeConfig.id];
|
||||||
}
|
}
|
||||||
return null;
|
return colorThemes.sakura;
|
||||||
};
|
};
|
||||||
|
|
||||||
const addRelay = (relayUrl: string) => {
|
const addRelay = (relayUrl: string) => {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ export const useColorTheme = (el: HTMLElement) => {
|
|||||||
|
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
const colorTheme = getColorTheme();
|
const colorTheme = getColorTheme();
|
||||||
if (colorTheme == null) return;
|
|
||||||
|
|
||||||
const { className } = colorTheme;
|
const { className } = colorTheme;
|
||||||
if (className != null) {
|
if (className != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user