From 4c5916709add1010a07077418e93b064e622c8de Mon Sep 17 00:00:00 2001 From: Ajay Dhangar <99037494+ajay-dhangar@users.noreply.github.com> Date: Sun, 22 Sep 2024 22:37:43 +0530 Subject: [PATCH 1/2] Update ScrollTopToButton.jsx --- src/components/Buttons/bottom/ScrollTopToButton.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Buttons/bottom/ScrollTopToButton.jsx b/src/components/Buttons/bottom/ScrollTopToButton.jsx index 74342bd6d..3eecc034f 100644 --- a/src/components/Buttons/bottom/ScrollTopToButton.jsx +++ b/src/components/Buttons/bottom/ScrollTopToButton.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { FaArrowDown } from "react-icons/fa"; import styles from "./ScrollTopToBottom.module.css"; @@ -35,4 +35,4 @@ export default function ScrollTopToBottom() { ) ); -} \ No newline at end of file +} From aa1d0d0ef0677eae2bb2a632e2867c601e31f735 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Sun, 22 Sep 2024 17:08:49 +0000 Subject: [PATCH 2/2] Restyled by prettier --- src/components/Buttons/bottom/ScrollTopToButton.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Buttons/bottom/ScrollTopToButton.jsx b/src/components/Buttons/bottom/ScrollTopToButton.jsx index 3eecc034f..9ce2cc0da 100644 --- a/src/components/Buttons/bottom/ScrollTopToButton.jsx +++ b/src/components/Buttons/bottom/ScrollTopToButton.jsx @@ -13,7 +13,8 @@ export default function ScrollTopToBottom() { }; const handleScroll = () => { - const bottomThreshold = document.documentElement.scrollHeight - window.innerHeight - 100; + const bottomThreshold = + document.documentElement.scrollHeight - window.innerHeight - 100; if (window.scrollY < bottomThreshold) { setShowButton(true); } else {