mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-24 15:47:08 +00:00
Fix error when switching generators with previews
This commit is contained in:
@@ -141,8 +141,8 @@ export function Generator({ lang, changeTitle, version, onChangeVersion }: Gener
|
||||
}
|
||||
|
||||
const [previewShown, setPreviewShown] = useState(false)
|
||||
|
||||
const hasPreview = HasPreview.includes(gen.id)
|
||||
if (previewShown && !hasPreview) setPreviewShown(false)
|
||||
let actionsShown = 1
|
||||
if (hasPreview) actionsShown += 1
|
||||
if (sourceShown) actionsShown += 2
|
||||
|
||||
Reference in New Issue
Block a user