From 80f27f610d3dc88c9ad1c3ec73b4d350849cacdb Mon Sep 17 00:00:00 2001 From: David Crespo Date: Thu, 23 Jul 2026 18:12:09 -0400 Subject: [PATCH 1/2] Fix preview banner --- app/components/ErrorPage.tsx | 2 +- app/components/MswBanner.tsx | 29 +++++++++++++++++-- app/components/PageSkeleton.tsx | 7 ++--- app/layouts/AuthLayout.tsx | 2 +- app/layouts/LoginLayout.tsx | 2 +- app/layouts/RootLayout.tsx | 7 ++--- app/layouts/helpers.tsx | 10 +++---- .../project/instances/SerialConsolePage.tsx | 2 +- app/ui/styles/index.css | 2 ++ 9 files changed, 43 insertions(+), 20 deletions(-) diff --git a/app/components/ErrorPage.tsx b/app/components/ErrorPage.tsx index db279eda68..c0c829aeae 100644 --- a/app/components/ErrorPage.tsx +++ b/app/components/ErrorPage.tsx @@ -29,7 +29,7 @@ type Props = { children: ReactNode; message?: string } export function ErrorPage({ children }: Props) { return ( -
+
+ {process.env.MSW_BANNER ? : null} + {children} +
+ ) +} + +function MswBanner({ disableButton }: Props) { const [isOpen, setIsOpen] = useState(false) const closeModal = () => setIsOpen(false) return ( <> - {/* The [&+*]:pt-10 style is to ensure the page container isn't pushed out of screen as it uses 100vh for layout */} -