Skip to content

Commit 05a807b

Browse files
fix(web): prevent preview alert from adding scroll to the page layout
1 parent 9b385f2 commit 05a807b

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages_rs/nextclade-web/src/components/Common/PreviewWarning.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function PreviewWarning() {
1919
}
2020

2121
return (
22-
<UncontrolledAlert color="warning" className="text-center m-0">
22+
<UncontrolledAlert color="warning" className="text-center m-0" fade={false}>
2323
<span>{warningText}</span>
2424
<span>
2525
<LinkExternal href={RELEASE_URL}>{RELEASE_URL}</LinkExternal>

packages_rs/nextclade-web/src/components/Layout/Layout.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import React, { PropsWithChildren, HTMLProps } from 'react'
2+
import { BrowserWarning } from 'src/components/Common/BrowserWarning'
3+
import { PreviewWarning } from 'src/components/Common/PreviewWarning'
24
import styled from 'styled-components'
35

46
import { NavigationBar } from './NavigationBar'
@@ -34,6 +36,8 @@ const FooterWrapper = styled.footer``
3436
export function Layout({ children }: PropsWithChildren<HTMLProps<HTMLDivElement>>) {
3537
return (
3638
<Container>
39+
<PreviewWarning />
40+
<BrowserWarning />
3741
<HeaderWrapper>
3842
<NavigationBar />
3943
</HeaderWrapper>

packages_rs/nextclade-web/src/pages/_app.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { RecoilEnv, RecoilRoot, useRecoilCallback, useRecoilState, useRecoilValu
88
import { AppProps } from 'next/app'
99
import { useRouter } from 'next/router'
1010
import dynamic from 'next/dynamic'
11-
import { BrowserWarning } from 'src/components/Common/BrowserWarning'
1211
import { sanitizeError } from 'src/helpers/sanitizeError'
1312
import { useRunAnalysis } from 'src/hooks/useRunAnalysis'
1413
import i18nAuspice, { changeAuspiceLocale } from 'src/i18n/i18n.auspice'
@@ -55,7 +54,6 @@ import {
5554
minimizerIndexVersionAtom,
5655
} from 'src/state/dataset.state'
5756
import { ErrorBoundary } from 'src/components/Error/ErrorBoundary'
58-
import { PreviewWarning } from 'src/components/Common/PreviewWarning'
5957

6058
import 'src/styles/global.scss'
6159

@@ -209,8 +207,6 @@ export function MyApp({ Component, pageProps, router }: AppProps) {
209207
</Suspense>
210208
<Suspense fallback={fallback}>
211209
<SEO />
212-
<PreviewWarning />
213-
<BrowserWarning />
214210
<Component {...pageProps} />
215211
<ErrorPopup />
216212
<ReactQueryDevtools initialIsOpen={false} />

0 commit comments

Comments
 (0)