|
|
@ -1,6 +1,6 @@
|
|
|
|
import React from 'react'
|
|
|
|
import React from 'react'
|
|
|
|
import { withRouter } from 'next/router'
|
|
|
|
import { withRouter } from 'next/router'
|
|
|
|
import { useCopyTextHandler, useOnline } from '@dawnlabs/tacklebox'
|
|
|
|
import { useCopyTextHandler, useOnline, useKeyboardListener } from '@dawnlabs/tacklebox'
|
|
|
|
|
|
|
|
|
|
|
|
import { COLORS, EXPORT_SIZES } from '../lib/constants'
|
|
|
|
import { COLORS, EXPORT_SIZES } from '../lib/constants'
|
|
|
|
import Button from './Button'
|
|
|
|
import Button from './Button'
|
|
|
@ -69,6 +69,12 @@ function ExportMenu({
|
|
|
|
const online = useOnline()
|
|
|
|
const online = useOnline()
|
|
|
|
const isSafari = useSafari()
|
|
|
|
const isSafari = useSafari()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useKeyboardListener('e', e => {
|
|
|
|
|
|
|
|
if (e.shiftKey && e.metaKey) {
|
|
|
|
|
|
|
|
exportImage()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const disablePNG = isSafari && (tooLarge || !online)
|
|
|
|
const disablePNG = isSafari && (tooLarge || !online)
|
|
|
|
|
|
|
|
|
|
|
|
const input = React.useRef()
|
|
|
|
const input = React.useRef()
|
|
|
|