File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed
Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change 1+ import siteMetadata from '@/data/siteMetadata'
12import { useEffect , useState } from 'react'
23import smoothscroll from 'smoothscroll-polyfill'
34
@@ -25,20 +26,22 @@ const ScrollTopAndComment = () => {
2526 < div
2627 className = { `fixed right-8 bottom-8 hidden flex-col gap-3 ${ show ? 'md:flex' : 'md:hidden' } ` }
2728 >
28- < button
29- aria-label = "Scroll To Comment"
30- type = "button"
31- onClick = { handleScrollToComment }
32- className = "rounded-full bg-gray-200 p-2 text-gray-500 transition-all hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-400 dark:hover:bg-gray-600"
33- >
34- < svg className = "h-5 w-5" viewBox = "0 0 20 20" fill = "currentColor" >
35- < path
36- fillRule = "evenodd"
37- d = "M18 10c0 3.866-3.582 7-8 7a8.841 8.841 0 01-4.083-.98L2 17l1.338-3.123C2.493 12.767 2 11.434 2 10c0-3.866 3.582-7 8-7s8 3.134 8 7zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z"
38- clipRule = "evenodd"
39- />
40- </ svg >
41- </ button >
29+ { siteMetadata . comment . provider && (
30+ < button
31+ aria-label = "Scroll To Comment"
32+ type = "button"
33+ onClick = { handleScrollToComment }
34+ className = "rounded-full bg-gray-200 p-2 text-gray-500 transition-all hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-400 dark:hover:bg-gray-600"
35+ >
36+ < svg className = "h-5 w-5" viewBox = "0 0 20 20" fill = "currentColor" >
37+ < path
38+ fillRule = "evenodd"
39+ d = "M18 10c0 3.866-3.582 7-8 7a8.841 8.841 0 01-4.083-.98L2 17l1.338-3.123C2.493 12.767 2 11.434 2 10c0-3.866 3.582-7 8-7s8 3.134 8 7zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z"
40+ clipRule = "evenodd"
41+ />
42+ </ svg >
43+ </ button >
44+ ) }
4245 < button
4346 aria-label = "Scroll To Top"
4447 type = "button"
You can’t perform that action at this time.
0 commit comments