mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): hide refiner collapse if refiner not installed
This commit is contained in:
parent
e391f3c9a8
commit
3d32ce2b58
@ -14,6 +14,7 @@ import ParamSDXLRefinerStart from './SDXLRefiner/ParamSDXLRefinerStart';
|
|||||||
import ParamSDXLRefinerSteps from './SDXLRefiner/ParamSDXLRefinerSteps';
|
import ParamSDXLRefinerSteps from './SDXLRefiner/ParamSDXLRefinerSteps';
|
||||||
import ParamUseSDXLRefiner from './SDXLRefiner/ParamUseSDXLRefiner';
|
import ParamUseSDXLRefiner from './SDXLRefiner/ParamUseSDXLRefiner';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { useIsRefinerAvailable } from 'services/api/hooks/useIsRefinerAvailable';
|
||||||
|
|
||||||
const selector = createSelector(
|
const selector = createSelector(
|
||||||
stateSelector,
|
stateSelector,
|
||||||
@ -31,6 +32,11 @@ const selector = createSelector(
|
|||||||
const ParamSDXLRefinerCollapse = () => {
|
const ParamSDXLRefinerCollapse = () => {
|
||||||
const { activeLabel, shouldUseSliders } = useAppSelector(selector);
|
const { activeLabel, shouldUseSliders } = useAppSelector(selector);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const isRefinerAvailable = useIsRefinerAvailable();
|
||||||
|
|
||||||
|
if (!isRefinerAvailable) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAICollapse label={t('sdxl.refiner')} activeLabel={activeLabel}>
|
<IAICollapse label={t('sdxl.refiner')} activeLabel={activeLabel}>
|
||||||
|
Loading…
Reference in New Issue
Block a user