From 03a5a14e42412278f3f257315b153c88bb281478 Mon Sep 17 00:00:00 2001 From: ani-kalpachka Date: Mon, 22 Jul 2024 19:50:05 +0300 Subject: [PATCH] Add scroll to top button --- src/components/client/faq/FaqPage.tsx | 2 -- src/components/client/layout/Layout.tsx | 2 ++ .../client/{faq => layout}/ScrollToTop.tsx | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) rename src/components/client/{faq => layout}/ScrollToTop.tsx (69%) diff --git a/src/components/client/faq/FaqPage.tsx b/src/components/client/faq/FaqPage.tsx index ff60fe513..790efd9b8 100644 --- a/src/components/client/faq/FaqPage.tsx +++ b/src/components/client/faq/FaqPage.tsx @@ -6,7 +6,6 @@ import React, { useMemo, useState } from 'react' import Layout from 'components/client/layout/Layout' import ContactUs from './ContactUs' -import ScrollToTop from './ScrollToTop' import VerticalTabs from './VerticalTabs' import ExpandableListItem from './ExpandableListItem' import { @@ -81,7 +80,6 @@ export default function FaqPage({ section }: Props) { - ) } diff --git a/src/components/client/layout/Layout.tsx b/src/components/client/layout/Layout.tsx index cd5683da3..3beae5dbc 100644 --- a/src/components/client/layout/Layout.tsx +++ b/src/components/client/layout/Layout.tsx @@ -11,6 +11,7 @@ import DetailsModal from 'components/admin/modal/DetailsModal' import AppNavBar from './AppNavBar' import MobileNav from './nav/MobileNav/MobileNav' +import ScrollToTop from './ScrollToTop' const createPageTitle = (suffix: string, title?: string) => { if (title) { @@ -135,6 +136,7 @@ export default function Layout({ {!hideFooter &&