fix(ui): do not use state => state as an input selector

This is a no-no, whoops!
This commit is contained in:
psychedelicious
2024-01-05 19:44:22 +11:00
parent ce64dbefce
commit a23502f7ff
235 changed files with 1087 additions and 951 deletions

View File

@ -32,7 +32,7 @@ const IAIInformationalPopover = ({
...rest
}: Props) => {
const shouldEnableInformationalPopovers = useAppSelector(
(state) => state.system.shouldEnableInformationalPopovers
(s) => s.system.shouldEnableInformationalPopovers
);
const data = useMemo(() => POPOVER_DATA[feature], [feature]);

View File

@ -13,7 +13,7 @@ export const InvLabel = memo(
ref
) => {
const shouldEnableInformationalPopovers = useAppSelector(
(state) => state.system.shouldEnableInformationalPopovers
(s) => s.system.shouldEnableInformationalPopovers
);
const ctx = useContext(InvControlGroupContext);

View File

@ -30,7 +30,7 @@ export const useGroupedModelInvSelect = <T extends AnyModelConfigEntity>(
): UseGroupedModelInvSelectReturn => {
const { t } = useTranslation();
const base_model = useAppSelector(
(state) => state.generation.model?.base_model ?? 'sdxl'
(s) => s.generation.model?.base_model ?? 'sdxl'
);
const { modelEntities, selectedModel, getIsDisabled, onChange, isLoading } =
arg;