Skip to content

Commit 30d5573

Browse files
committed
Add ScrollTop component to comics layout
Incorporated the ScrollTop component into the comics layout to enhance user navigation by allowing users to quickly return to the top of the page. This update ensures a smoother and more intuitive user experience when browsing the comics section.
1 parent 0538e1b commit 30d5573

File tree

1 file changed

+22
-18
lines changed
  • frontend-next-migration/src/app/[lng]/(intro)/comics

1 file changed

+22
-18
lines changed

frontend-next-migration/src/app/[lng]/(intro)/comics/layout.tsx

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import cls from './Layout.module.scss';
55
import introBg from '@/shared/assets/images/comics/comics5.webp';
66
import { ScrollToSectionButton } from './_components/ScrollToSectionButton';
77
import { comicsSectionId } from '@/preparedPages/ComicsGalleriesPages';
8+
import { ScrollTop } from '@/features/ScrollTop';
89

910
type Props = {
1011
children: ReactNode;
@@ -19,23 +20,26 @@ export default async function ComicsLayout({ children, params }: Props) {
1920
const { t } = await useServerTranslation(lng, 'comics');
2021

2122
return (
22-
<LayoutWithIntro
23-
introHeight={'86vh'}
24-
title={t('page-title')}
25-
overlayColor={'rgba(7, 27, 30, 0.5'}
26-
bgImage={introBg.src}
27-
description={t('page-description')}
28-
blurLineClass={cls.blurLine}
29-
bottomAdditional={
30-
<ScrollToSectionButton
31-
className={cls.diveButton}
32-
scrollToId={comicsSectionId}
33-
>
34-
<b>{t('page-dive')}</b>
35-
</ScrollToSectionButton>
36-
}
37-
>
38-
{children}
39-
</LayoutWithIntro>
23+
<>
24+
<ScrollTop />
25+
<LayoutWithIntro
26+
introHeight={'86vh'}
27+
title={t('page-title')}
28+
overlayColor={'rgba(7, 27, 30, 0.5'}
29+
bgImage={introBg.src}
30+
description={t('page-description')}
31+
blurLineClass={cls.blurLine}
32+
bottomAdditional={
33+
<ScrollToSectionButton
34+
className={cls.diveButton}
35+
scrollToId={comicsSectionId}
36+
>
37+
<b>{t('page-dive')}</b>
38+
</ScrollToSectionButton>
39+
}
40+
>
41+
{children}
42+
</LayoutWithIntro>
43+
</>
4044
);
4145
}

0 commit comments

Comments
 (0)