Merge pull request #427 from cdransf/master

Render floating comment button only if a provider is specified
This commit is contained in:
Timothy 2022-03-28 11:52:00 -07:00 committed by GitHub
commit cee491802f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
import siteMetadata from '@/data/siteMetadata'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import smoothscroll from 'smoothscroll-polyfill' import smoothscroll from 'smoothscroll-polyfill'
@ -25,6 +26,7 @@ const ScrollTopAndComment = () => {
<div <div
className={`fixed right-8 bottom-8 hidden flex-col gap-3 ${show ? 'md:flex' : 'md:hidden'}`} className={`fixed right-8 bottom-8 hidden flex-col gap-3 ${show ? 'md:flex' : 'md:hidden'}`}
> >
{siteMetadata.comment.provider && (
<button <button
aria-label="Scroll To Comment" aria-label="Scroll To Comment"
type="button" type="button"
@ -39,6 +41,7 @@ const ScrollTopAndComment = () => {
/> />
</svg> </svg>
</button> </button>
)}
<button <button
aria-label="Scroll To Top" aria-label="Scroll To Top"
type="button" type="button"