tidy(ui): regional guidance buttons

This commit is contained in:
psychedelicious 2024-08-23 17:11:47 +10:00
parent aefb2339bb
commit a000ad75f6
2 changed files with 5 additions and 3 deletions

View File

@ -17,7 +17,7 @@ type AddPromptButtonProps = {
id: string;
};
export const AddPromptButtons = ({ id }: AddPromptButtonProps) => {
export const RegionalGuidanceAddPromptsIPAdapterButtons = ({ id }: AddPromptButtonProps) => {
const { t } = useTranslation();
const dispatch = useAppDispatch();
const defaultIPAdapter = useDefaultIPAdapter();

View File

@ -1,7 +1,7 @@
import { Divider } from '@invoke-ai/ui-library';
import { useAppSelector } from 'app/store/storeHooks';
import { AddPromptButtons } from 'features/controlLayers/components/AddPromptButtons';
import { CanvasEntitySettingsWrapper } from 'features/controlLayers/components/common/CanvasEntitySettingsWrapper';
import { RegionalGuidanceAddPromptsIPAdapterButtons } from 'features/controlLayers/components/RegionalGuidance/RegionalGuidanceAddPromptsIPAdapterButtons';
import { useEntityIdentifierContext } from 'features/controlLayers/contexts/EntityIdentifierContext';
import { selectRegionalGuidanceEntityOrThrow } from 'features/controlLayers/store/regionsReducers';
import { memo } from 'react';
@ -24,7 +24,9 @@ export const RegionalGuidanceSettings = memo(() => {
return (
<CanvasEntitySettingsWrapper>
{!hasPositivePrompt && !hasNegativePrompt && !hasIPAdapters && <AddPromptButtons id={id} />}
{!hasPositivePrompt && !hasNegativePrompt && !hasIPAdapters && (
<RegionalGuidanceAddPromptsIPAdapterButtons id={id} />
)}
{hasPositivePrompt && (
<>
<RegionalGuidancePositivePrompt id={id} />