remove unnecessary Toaster containers, fix #207
This commit is contained in:
parent
dfb4a46765
commit
09575b85b6
|
@ -1,7 +1,7 @@
|
||||||
import { MouseEventHandler } from 'react'
|
import { MouseEventHandler } from 'react'
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||||
import { IconProp } from '@fortawesome/fontawesome-svg-core'
|
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 { useClipboard } from 'use-clipboard-copy'
|
||||||
|
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
|
@ -62,8 +62,6 @@ const DownloadButtonGroup: React.FC<{ downloadUrl: string }> = ({ downloadUrl })
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-wrap justify-center gap-2">
|
<div className="flex flex-wrap justify-center gap-2">
|
||||||
<Toaster />
|
|
||||||
|
|
||||||
<DownloadButton
|
<DownloadButton
|
||||||
onClickCallback={() => window.open(downloadUrl)}
|
onClickCallback={() => window.open(downloadUrl)}
|
||||||
btnColor="blue"
|
btnColor="blue"
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { FunctionComponent } from 'react'
|
||||||
import ReactPlayer from 'react-player'
|
import ReactPlayer from 'react-player'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import { useClipboard } from 'use-clipboard-copy'
|
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 { getBaseUrl } from '../../utils/getBaseUrl'
|
||||||
import { DownloadButton } from '../DownloadBtnGtoup'
|
import { DownloadButton } from '../DownloadBtnGtoup'
|
||||||
|
@ -25,8 +25,6 @@ const VideoPreview: FunctionComponent<{ file: any }> = ({ file }) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-wrap justify-center mt-4 gap-2">
|
<div className="flex flex-wrap justify-center mt-4 gap-2">
|
||||||
<Toaster />
|
|
||||||
|
|
||||||
<DownloadButton
|
<DownloadButton
|
||||||
onClickCallback={() => window.open(file['@microsoft.graph.downloadUrl'])}
|
onClickCallback={() => window.open(file['@microsoft.graph.downloadUrl'])}
|
||||||
btnColor="blue"
|
btnColor="blue"
|
||||||
|
|
Loading…
Reference in a new issue