-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
393 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
import React from 'react' | ||
import PropTypes from "prop-types" | ||
import { IoIosArrowUp } from "react-icons/io" | ||
import { trackScrollPosition } from "../../utils/hooks/trackScrollPosition" | ||
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import { IoIosArrowUp } from "react-icons/io"; | ||
import { useTrackScrollPosition } from "../../utils/hooks/trackScrollPosition"; | ||
|
||
const scrollTop = () => { | ||
|
||
trackScrollPosition("scrollTop-btn"); | ||
useTrackScrollPosition("scrollTop-btn"); | ||
|
||
return ( | ||
<div id="scrollTop-btn" className="scrollTop-btn cursor-pointer group" onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}> | ||
<IoIosArrowUp className="scrollTopArrow absolute font-bold text-3xl text-gray-500 group-hover:text-white" /> | ||
<div | ||
id="scrollTop-btn" | ||
className="scrollTop-btn cursor-pointer group" | ||
onClick={() => window.scrollTo({ top: 0, behavior: "smooth" })} | ||
> | ||
<IoIosArrowUp className="scrollTopArrow absolute font-bold text-3xl text-gray-500 group-hover:text-white" /> | ||
</div> | ||
) | ||
} | ||
); | ||
}; | ||
|
||
export default scrollTop | ||
export default scrollTop; | ||
|
||
scrollTop.propTypes = { | ||
pageContext: PropTypes.any, | ||
|
||
} | ||
pageContext: PropTypes.any | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.