Update scene screenshot in edit panel (#2657)

This commit is contained in:
WithoutPants
2022-06-08 08:58:59 +10:00
committed by GitHub
parent 5e455d6530
commit 456e9409e0

View File

@@ -77,7 +77,11 @@ export const SceneEditPanel: React.FC<IProps> = ({
const [coverImagePreview, setCoverImagePreview] = useState< const [coverImagePreview, setCoverImagePreview] = useState<
string | undefined string | undefined
>(scene.paths.screenshot ?? undefined); >();
useEffect(() => {
setCoverImagePreview(scene.paths.screenshot ?? undefined);
}, [scene.paths.screenshot]);
const { configuration: stashConfig } = React.useContext(ConfigurationContext); const { configuration: stashConfig } = React.useContext(ConfigurationContext);