fix: flashing spawn context menu

This commit is contained in:
Davide Passoni 2024-12-11 18:20:13 +01:00
parent 7fe9b0d19f
commit e6d2d906e1
2 changed files with 3 additions and 4 deletions

View File

@ -158,7 +158,7 @@ export function SpawnContextMenu(props: {}) {
setHeight(content.clientHeight);
});
resizeObserver.observe(content);
return () => resizeObserver.disconnect(); // clean up
return () => resizeObserver.disconnect(); // clean up
}
});
@ -169,8 +169,7 @@ export function SpawnContextMenu(props: {}) {
ref={contentRef}
data-hidden={appState !== OlympusState.SPAWN_CONTEXT}
className={`
absolute flex w-[395px] data- max-h-[800px] flex-wrap gap-2
overflow-auto rounded-md bg-olympus-800
absolute flex w-[395px] flex-wrap gap-2 rounded-md bg-olympus-800
data-[hidden=true]:hidden
`}
>

View File

@ -154,7 +154,7 @@ export function UnitSpawnMenu(props: {
{props.compact ? (
<>
{props.visible && (
<div className="flex flex-col">
<div className="flex max-h-[800px] flex-col overflow-auto">
<div className="flex h-fit flex-col gap-3">
<div className="flex">
<FontAwesomeIcon