From 6da40a4be5aeed50a07f9e2e6fee3f774d1a4cfc Mon Sep 17 00:00:00 2001 From: ani-kalpachka Date: Sun, 28 Jul 2024 21:52:52 +0300 Subject: [PATCH 1/2] Update Scroll to top button --- public/scroll-to-top-icon.svg | 4 ++++ src/components/client/layout/ScrollToTop.tsx | 14 ++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 public/scroll-to-top-icon.svg diff --git a/public/scroll-to-top-icon.svg b/public/scroll-to-top-icon.svg new file mode 100644 index 000000000..fd9b29dee --- /dev/null +++ b/public/scroll-to-top-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/client/layout/ScrollToTop.tsx b/src/components/client/layout/ScrollToTop.tsx index f1da36615..92a07db0c 100644 --- a/src/components/client/layout/ScrollToTop.tsx +++ b/src/components/client/layout/ScrollToTop.tsx @@ -1,11 +1,15 @@ import React, { useEffect, useState } from 'react' -import { ArrowCircleUp } from '@mui/icons-material' +import Image from 'next/image' + import { Box } from '@mui/material' import theme from 'common/theme' + const ScrollToTop = () => { + const scrollToTopButtonPath = '/scroll-to-top-icon.svg' + const [isVisible, setIsVisible] = useState(false) const toggleVisibility = () => { @@ -39,13 +43,7 @@ const ScrollToTop = () => { bottom: theme.spacing(2), }} onClick={scrollToTop}> - + Scroll to top button )} From 3593da4c39bac23d89556f967552ce67b3cffed0 Mon Sep 17 00:00:00 2001 From: ani-kalpachka Date: Sun, 28 Jul 2024 21:55:37 +0300 Subject: [PATCH 2/2] Rearange scroll to top image attributes --- src/components/client/layout/ScrollToTop.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/client/layout/ScrollToTop.tsx b/src/components/client/layout/ScrollToTop.tsx index 92a07db0c..0aa8be48e 100644 --- a/src/components/client/layout/ScrollToTop.tsx +++ b/src/components/client/layout/ScrollToTop.tsx @@ -6,10 +6,9 @@ import { Box } from '@mui/material' import theme from 'common/theme' - const ScrollToTop = () => { const scrollToTopButtonPath = '/scroll-to-top-icon.svg' - + const [isVisible, setIsVisible] = useState(false) const toggleVisibility = () => { @@ -43,7 +42,7 @@ const ScrollToTop = () => { bottom: theme.spacing(2), }} onClick={scrollToTop}> - Scroll to top button + Scroll to top button )}