diff --git a/src/components/Page.tsx b/src/components/Page.tsx index 7772e495cd..399c1a55c1 100644 --- a/src/components/Page.tsx +++ b/src/components/Page.tsx @@ -1,16 +1,22 @@ -import React, { FunctionComponent, useEffect, useRef } from 'react'; +import React, { FunctionComponent, HTMLAttributes, useEffect, useRef } from 'react'; import viewManager from './viewManager/viewManager'; type PageProps = { - title?: string + title?: string, + isBackButtonEnabled?: boolean }; /** * Page component that handles hiding active non-react views, triggering the required events for * navigation and appRouter state updates, and setting the correct classes and data attributes. */ -const Page: FunctionComponent = ({ children, title }) => { +const Page: FunctionComponent> = ({ + children, + className = '', + title, + isBackButtonEnabled = true +}) => { const element = useRef(null); useEffect(() => { @@ -38,9 +44,9 @@ const Page: FunctionComponent = ({ children, title }) => {
{children}
diff --git a/src/routes/search.tsx b/src/routes/search.tsx index 864af6141e..cd50e9e0b6 100644 --- a/src/routes/search.tsx +++ b/src/routes/search.tsx @@ -13,7 +13,7 @@ const SearchPage: FunctionComponent = () => { const [ searchParams ] = useSearchParams(); return ( - + {!query &&