Files
InvokeAI/invokeai/frontend/src/features/ui/components/ImageToImage/InitialImageOverlay.tsx
David Regla e46102124e [WebUI] Even off JSX string props
Increased consistency and readability by replacing any unnecessary JSX expressions in places where string literals are sufficient
2023-02-16 19:54:25 +11:00

19 lines
487 B
TypeScript

import { Image } from '@chakra-ui/react';
import { RootState } from 'app/store';
import { useAppSelector } from 'app/storeHooks';
export default function InitialImageOverlay() {
const initialImage = useAppSelector(
(state: RootState) => state.generation.initialImage
);
return initialImage ? (
<Image
fit="contain"
src={typeof initialImage === 'string' ? initialImage : initialImage.url}
rounded="md"
className="checkerboard"
/>
) : null;
}