Skip to content

Commit

Permalink
fix: remvoe panel clickaway
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jun 24, 2024
1 parent 6d354c2 commit 434efee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"useArrowFunction": "off"
},
"correctness": {
"noUnusedImports": "error",
"noChildrenProp": "error",
"noConstAssign": "error",
"noConstantCondition": "error",
Expand Down
8 changes: 4 additions & 4 deletions src/components/ui/float-panel/FloatPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { AnimatePresence, m } from 'framer-motion'
import type { Placement, Strategy } from '@floating-ui/react-dom'
import type { FC, PropsWithChildren } from 'react'

import useClickAway from '~/hooks/common/use-click-away'
import { clsxm } from '~/lib/helper'

import { RootPortal } from '../portal'
Expand Down Expand Up @@ -34,9 +33,10 @@ export const FloatPanel: FC<FloatPanelProps & PropsWithChildren> = (props) => {
const floatingRef = useRef<HTMLElement>()
floatingRef.current = elements.floating || undefined
// @ts-ignore
useClickAway(floatingRef, () => {
setPanelOpen(false)
})
// useClickAway(floatingRef, (e) => {

// setPanelOpen(false)
// })

return (
<>
Expand Down

0 comments on commit 434efee

Please sign in to comment.