Skip to content

Commit

Permalink
Fix: manually remove onClick handler to let drawer button work as int…
Browse files Browse the repository at this point in the history
…ented
  • Loading branch information
mrdjohnson committed Feb 26, 2024
1 parent 33270d1 commit 6a5aa12
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/Dropzone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ const Dropzone = ({ children }: PropsWithChildren) => {

const { getRootProps, getInputProps, isDragActive } = useDropzone({ onDrop, maxFiles: 1 })

const { onClick, ...rootProps } = getRootProps()

return (
<div className="grid max-h-dvh min-h-dvh" {...getRootProps()} onClick={e => e.preventDefault()}>
<div className="grid max-h-dvh min-h-dvh" {...rootProps}>
<input {...getInputProps()} />

{isDragActive && (
Expand All @@ -28,4 +30,4 @@ const Dropzone = ({ children }: PropsWithChildren) => {
)
}

export default Dropzone
export default Dropzone

0 comments on commit 6a5aa12

Please sign in to comment.