mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(ui): tidy remaining selectors
These were just using overly verbose syntax - like explicitly typing `state: RootState`, which is unnecessary.
This commit is contained in:
@@ -10,12 +10,8 @@ import { useTranslation } from 'react-i18next';
|
||||
export const SettingsLogLevelSelect = memo(() => {
|
||||
const { t } = useTranslation();
|
||||
const dispatch = useAppDispatch();
|
||||
const consoleLogLevel = useAppSelector(
|
||||
(s) => s.system.consoleLogLevel
|
||||
);
|
||||
const shouldLogToConsole = useAppSelector(
|
||||
(s) => s.system.shouldLogToConsole
|
||||
);
|
||||
const consoleLogLevel = useAppSelector((s) => s.system.consoleLogLevel);
|
||||
const shouldLogToConsole = useAppSelector((s) => s.system.shouldLogToConsole);
|
||||
const options = useMemo(
|
||||
() => zLogLevel.options.map((o) => ({ label: o, value: o })),
|
||||
[]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { RootState } from 'app/store/store';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import type { AppFeature, SDFeature } from 'app/types/invokeai';
|
||||
import type { InvokeTabName } from 'features/ui/store/tabMap';
|
||||
@@ -7,17 +6,11 @@ import { useMemo } from 'react';
|
||||
export const useFeatureStatus = (
|
||||
feature: AppFeature | SDFeature | InvokeTabName
|
||||
) => {
|
||||
const disabledTabs = useAppSelector(
|
||||
(state: RootState) => state.config.disabledTabs
|
||||
);
|
||||
const disabledTabs = useAppSelector((s) => s.config.disabledTabs);
|
||||
|
||||
const disabledFeatures = useAppSelector(
|
||||
(state: RootState) => state.config.disabledFeatures
|
||||
);
|
||||
const disabledFeatures = useAppSelector((s) => s.config.disabledFeatures);
|
||||
|
||||
const disabledSDFeatures = useAppSelector(
|
||||
(state: RootState) => state.config.disabledSDFeatures
|
||||
);
|
||||
const disabledSDFeatures = useAppSelector((s) => s.config.disabledSDFeatures);
|
||||
|
||||
const isFeatureDisabled = useMemo(
|
||||
() =>
|
||||
|
||||
Reference in New Issue
Block a user