Skip to content

Commit 434efee

Browse files
committed
fix: remvoe panel clickaway
Signed-off-by: Innei <[email protected]>
1 parent 6d354c2 commit 434efee

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

biome.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"useArrowFunction": "off"
2121
},
2222
"correctness": {
23+
"noUnusedImports": "error",
2324
"noChildrenProp": "error",
2425
"noConstAssign": "error",
2526
"noConstantCondition": "error",

src/components/ui/float-panel/FloatPanel.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { AnimatePresence, m } from 'framer-motion'
44
import type { Placement, Strategy } from '@floating-ui/react-dom'
55
import type { FC, PropsWithChildren } from 'react'
66

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

109
import { RootPortal } from '../portal'
@@ -34,9 +33,10 @@ export const FloatPanel: FC<FloatPanelProps & PropsWithChildren> = (props) => {
3433
const floatingRef = useRef<HTMLElement>()
3534
floatingRef.current = elements.floating || undefined
3635
// @ts-ignore
37-
useClickAway(floatingRef, () => {
38-
setPanelOpen(false)
39-
})
36+
// useClickAway(floatingRef, (e) => {
37+
38+
// setPanelOpen(false)
39+
// })
4040

4141
return (
4242
<>

0 commit comments

Comments
 (0)