From 32fd71f76bc3c7ac0f93cd5df3230e23f6ae48b4 Mon Sep 17 00:00:00 2001 From: ivan-aksamentov Date: Fri, 29 Sep 2023 00:17:13 +0200 Subject: [PATCH] fix(web): prevent preview alert from adding scroll to the page layout --- .../nextclade-web/src/components/Common/PreviewWarning.tsx | 2 +- packages_rs/nextclade-web/src/components/Layout/Layout.tsx | 4 ++++ packages_rs/nextclade-web/src/pages/_app.tsx | 4 ---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages_rs/nextclade-web/src/components/Common/PreviewWarning.tsx b/packages_rs/nextclade-web/src/components/Common/PreviewWarning.tsx index bfe479202..dfea12cc6 100644 --- a/packages_rs/nextclade-web/src/components/Common/PreviewWarning.tsx +++ b/packages_rs/nextclade-web/src/components/Common/PreviewWarning.tsx @@ -19,7 +19,7 @@ export function PreviewWarning() { } return ( - + {warningText} {RELEASE_URL} diff --git a/packages_rs/nextclade-web/src/components/Layout/Layout.tsx b/packages_rs/nextclade-web/src/components/Layout/Layout.tsx index c160d0316..41a0779c9 100644 --- a/packages_rs/nextclade-web/src/components/Layout/Layout.tsx +++ b/packages_rs/nextclade-web/src/components/Layout/Layout.tsx @@ -1,4 +1,6 @@ import React, { PropsWithChildren, HTMLProps } from 'react' +import { BrowserWarning } from 'src/components/Common/BrowserWarning' +import { PreviewWarning } from 'src/components/Common/PreviewWarning' import styled from 'styled-components' import { NavigationBar } from './NavigationBar' @@ -34,6 +36,8 @@ const FooterWrapper = styled.footer`` export function Layout({ children }: PropsWithChildren>) { return ( + + diff --git a/packages_rs/nextclade-web/src/pages/_app.tsx b/packages_rs/nextclade-web/src/pages/_app.tsx index 37ac1716f..7b59d5011 100644 --- a/packages_rs/nextclade-web/src/pages/_app.tsx +++ b/packages_rs/nextclade-web/src/pages/_app.tsx @@ -8,7 +8,6 @@ import { RecoilEnv, RecoilRoot, useRecoilCallback, useRecoilState, useRecoilValu import { AppProps } from 'next/app' import { useRouter } from 'next/router' import dynamic from 'next/dynamic' -import { BrowserWarning } from 'src/components/Common/BrowserWarning' import { sanitizeError } from 'src/helpers/sanitizeError' import { useRunAnalysis } from 'src/hooks/useRunAnalysis' import i18nAuspice, { changeAuspiceLocale } from 'src/i18n/i18n.auspice' @@ -55,7 +54,6 @@ import { minimizerIndexVersionAtom, } from 'src/state/dataset.state' import { ErrorBoundary } from 'src/components/Error/ErrorBoundary' -import { PreviewWarning } from 'src/components/Common/PreviewWarning' import 'src/styles/global.scss' @@ -209,8 +207,6 @@ export function MyApp({ Component, pageProps, router }: AppProps) { - -