mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
lint
This commit is contained in:
parent
569c80cbf4
commit
4cfecf8493
3 changed files with 13 additions and 10 deletions
|
@ -92,7 +92,9 @@ const handleDeepLinkPath = (uri?: string) => {
|
||||||
const authorCode = url.searchParams.get("author");
|
const authorCode = url.searchParams.get("author");
|
||||||
|
|
||||||
if (themeName && authorCode) {
|
if (themeName && authorCode) {
|
||||||
WindowManager.redirect(`settings?theme=${themeName}&author=${authorCode}`);
|
WindowManager.redirect(
|
||||||
|
`settings?theme=${themeName}&author=${authorCode}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -18,13 +18,13 @@ export interface SettingsContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const settingsContext = createContext<SettingsContext>({
|
export const settingsContext = createContext<SettingsContext>({
|
||||||
updateUserPreferences: async () => { },
|
updateUserPreferences: async () => {},
|
||||||
setCurrentCategoryIndex: () => { },
|
setCurrentCategoryIndex: () => {},
|
||||||
clearSourceUrl: () => { },
|
clearSourceUrl: () => {},
|
||||||
sourceUrl: null,
|
sourceUrl: null,
|
||||||
currentCategoryIndex: 0,
|
currentCategoryIndex: 0,
|
||||||
blockedUsers: [],
|
blockedUsers: [],
|
||||||
fetchBlockedUsers: async () => { },
|
fetchBlockedUsers: async () => {},
|
||||||
appearanceTheme: null,
|
appearanceTheme: null,
|
||||||
appearanceAuthor: null,
|
appearanceAuthor: null,
|
||||||
});
|
});
|
||||||
|
@ -42,9 +42,7 @@ export function SettingsContextProvider({
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const [sourceUrl, setSourceUrl] = useState<string | null>(null);
|
const [sourceUrl, setSourceUrl] = useState<string | null>(null);
|
||||||
const [appearanceTheme, setAppearanceTheme] = useState<string | null>(null);
|
const [appearanceTheme, setAppearanceTheme] = useState<string | null>(null);
|
||||||
const [appearanceAuthor, setAppearanceAuthor] = useState<string | null>(
|
const [appearanceAuthor, setAppearanceAuthor] = useState<string | null>(null);
|
||||||
null
|
|
||||||
);
|
|
||||||
const [currentCategoryIndex, setCurrentCategoryIndex] = useState(0);
|
const [currentCategoryIndex, setCurrentCategoryIndex] = useState(0);
|
||||||
|
|
||||||
const [blockedUsers, setBlockedUsers] = useState<UserBlocks["blocks"]>([]);
|
const [blockedUsers, setBlockedUsers] = useState<UserBlocks["blocks"]>([]);
|
||||||
|
|
|
@ -9,7 +9,10 @@ interface SettingsAppearanceProps {
|
||||||
appearanceAuthor: string | null;
|
appearanceAuthor: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SettingsAppearance = ({ appearanceTheme, appearanceAuthor }: SettingsAppearanceProps) => {
|
export const SettingsAppearance = ({
|
||||||
|
appearanceTheme,
|
||||||
|
appearanceAuthor,
|
||||||
|
}: SettingsAppearanceProps) => {
|
||||||
const [themes, setThemes] = useState<Theme[]>([]);
|
const [themes, setThemes] = useState<Theme[]>([]);
|
||||||
const [isImportThemeModalVisible, setIsImportThemeModalVisible] =
|
const [isImportThemeModalVisible, setIsImportThemeModalVisible] =
|
||||||
useState(false);
|
useState(false);
|
||||||
|
@ -40,7 +43,7 @@ export const SettingsAppearance = ({ appearanceTheme, appearanceAuthor }: Settin
|
||||||
setIsImportThemeModalVisible(true);
|
setIsImportThemeModalVisible(true);
|
||||||
setImportTheme({
|
setImportTheme({
|
||||||
theme: appearanceTheme,
|
theme: appearanceTheme,
|
||||||
author: appearanceAuthor
|
author: appearanceAuthor,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [appearanceTheme, appearanceAuthor]);
|
}, [appearanceTheme, appearanceAuthor]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue