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");
|
||||
|
||||
if (themeName && authorCode) {
|
||||
WindowManager.redirect(`settings?theme=${themeName}&author=${authorCode}`);
|
||||
WindowManager.redirect(
|
||||
`settings?theme=${themeName}&author=${authorCode}`
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
@ -18,13 +18,13 @@ export interface SettingsContext {
|
|||
}
|
||||
|
||||
export const settingsContext = createContext<SettingsContext>({
|
||||
updateUserPreferences: async () => { },
|
||||
setCurrentCategoryIndex: () => { },
|
||||
clearSourceUrl: () => { },
|
||||
updateUserPreferences: async () => {},
|
||||
setCurrentCategoryIndex: () => {},
|
||||
clearSourceUrl: () => {},
|
||||
sourceUrl: null,
|
||||
currentCategoryIndex: 0,
|
||||
blockedUsers: [],
|
||||
fetchBlockedUsers: async () => { },
|
||||
fetchBlockedUsers: async () => {},
|
||||
appearanceTheme: null,
|
||||
appearanceAuthor: null,
|
||||
});
|
||||
|
@ -42,9 +42,7 @@ export function SettingsContextProvider({
|
|||
const dispatch = useAppDispatch();
|
||||
const [sourceUrl, setSourceUrl] = useState<string | null>(null);
|
||||
const [appearanceTheme, setAppearanceTheme] = useState<string | null>(null);
|
||||
const [appearanceAuthor, setAppearanceAuthor] = useState<string | null>(
|
||||
null
|
||||
);
|
||||
const [appearanceAuthor, setAppearanceAuthor] = useState<string | null>(null);
|
||||
const [currentCategoryIndex, setCurrentCategoryIndex] = useState(0);
|
||||
|
||||
const [blockedUsers, setBlockedUsers] = useState<UserBlocks["blocks"]>([]);
|
||||
|
|
|
@ -9,7 +9,10 @@ interface SettingsAppearanceProps {
|
|||
appearanceAuthor: string | null;
|
||||
}
|
||||
|
||||
export const SettingsAppearance = ({ appearanceTheme, appearanceAuthor }: SettingsAppearanceProps) => {
|
||||
export const SettingsAppearance = ({
|
||||
appearanceTheme,
|
||||
appearanceAuthor,
|
||||
}: SettingsAppearanceProps) => {
|
||||
const [themes, setThemes] = useState<Theme[]>([]);
|
||||
const [isImportThemeModalVisible, setIsImportThemeModalVisible] =
|
||||
useState(false);
|
||||
|
@ -40,7 +43,7 @@ export const SettingsAppearance = ({ appearanceTheme, appearanceAuthor }: Settin
|
|||
setIsImportThemeModalVisible(true);
|
||||
setImportTheme({
|
||||
theme: appearanceTheme,
|
||||
author: appearanceAuthor
|
||||
author: appearanceAuthor,
|
||||
});
|
||||
}
|
||||
}, [appearanceTheme, appearanceAuthor]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue