diff --git a/app/src/ui/layouts/AppShell/AppShell.tsx b/app/src/ui/layouts/AppShell/AppShell.tsx index b6f704a..ad89ce0 100644 --- a/app/src/ui/layouts/AppShell/AppShell.tsx +++ b/app/src/ui/layouts/AppShell/AppShell.tsx @@ -397,11 +397,16 @@ export function MaxHeightContainer(props: ComponentPropsWithoutRef<"div">) { } } - useEffect(updateHeaderHeight, []); + useEffect(() => { + updateHeaderHeight(); + const resize = throttle(updateHeaderHeight, 500); - if (typeof window !== "undefined") { - window.addEventListener("resize", throttle(updateHeaderHeight, 500)); - } + window.addEventListener("resize", resize); + + return () => { + window.removeEventListener("resize", resize); + }; + }, []); return (
diff --git a/app/src/ui/main.css b/app/src/ui/main.css index 755af31..4d0f459 100644 --- a/app/src/ui/main.css +++ b/app/src/ui/main.css @@ -122,3 +122,7 @@ body, @utility debug-blue { @apply border-blue-500 border; } +@utility w-min-content { + width: min-content; + width: -webkit-min-content; +} diff --git a/app/src/ui/routes/media/media.settings.tsx b/app/src/ui/routes/media/media.settings.tsx index 3a904e2..f995482 100644 --- a/app/src/ui/routes/media/media.settings.tsx +++ b/app/src/ui/routes/media/media.settings.tsx @@ -139,7 +139,7 @@ function Adapters() { Media Adapter: {ctx.selected === null && (Choose one)} -
+
{ctx.schemas?.map((schema: any, i) => (