remove unnecessary Toaster containers, fix #207

This commit is contained in:
spencerwooo 2021-12-29 17:08:10 +08:00
parent dfb4a46765
commit 09575b85b6
No known key found for this signature in database
GPG key ID: 24CD550268849CA0
2 changed files with 2 additions and 6 deletions

View file

@ -1,7 +1,7 @@
import { MouseEventHandler } from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { IconProp } from '@fortawesome/fontawesome-svg-core'
import toast, { Toaster } from 'react-hot-toast'
import toast from 'react-hot-toast'
import { useClipboard } from 'use-clipboard-copy'
import Image from 'next/image'
@ -62,8 +62,6 @@ const DownloadButtonGroup: React.FC<{ downloadUrl: string }> = ({ downloadUrl })
return (
<div className="flex flex-wrap justify-center gap-2">
<Toaster />
<DownloadButton
onClickCallback={() => window.open(downloadUrl)}
btnColor="blue"

View file

@ -2,7 +2,7 @@ import { FunctionComponent } from 'react'
import ReactPlayer from 'react-player'
import { useRouter } from 'next/router'
import { useClipboard } from 'use-clipboard-copy'
import toast, { Toaster } from 'react-hot-toast'
import toast from 'react-hot-toast'
import { getBaseUrl } from '../../utils/getBaseUrl'
import { DownloadButton } from '../DownloadBtnGtoup'
@ -25,8 +25,6 @@ const VideoPreview: FunctionComponent<{ file: any }> = ({ file }) => {
</div>
<div className="flex flex-wrap justify-center mt-4 gap-2">
<Toaster />
<DownloadButton
onClickCallback={() => window.open(file['@microsoft.graph.downloadUrl'])}
btnColor="blue"