mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-24 17:48:30 +02:00
Fix imports
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import type React from 'react';
|
import type { ReactNode } from 'react';
|
||||||
import { Fragment } from 'react';
|
import { Fragment } from 'react';
|
||||||
import type { HotkeyAction } from '../../hooks/useHotKey';
|
import type { HotkeyAction } from '../../hooks/useHotKey';
|
||||||
import { HotKey } from './HotKey';
|
import { HotKey } from './HotKey';
|
||||||
@@ -7,7 +7,7 @@ import { HotKeyLabel } from './HotKeyLabel';
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
hotkeys: HotkeyAction[];
|
hotkeys: HotkeyAction[];
|
||||||
bottomSlot?: React.ReactNode;
|
bottomSlot?: ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,12 @@ import { useDndContext, useDndMonitor, useDraggable, useDroppable } from '@dnd-k
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { useAtomValue } from 'jotai';
|
import { useAtomValue } from 'jotai';
|
||||||
import { selectAtom } from 'jotai/utils';
|
import { selectAtom } from 'jotai/utils';
|
||||||
import type React from 'react';
|
import type {
|
||||||
import type { MouseEvent, PointerEvent } from 'react';
|
MouseEvent,
|
||||||
|
PointerEvent,
|
||||||
|
FocusEvent as ReactFocusEvent,
|
||||||
|
KeyboardEvent as ReactKeyboardEvent,
|
||||||
|
} from 'react';
|
||||||
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||||
import { computeSideForDragMove } from '../../../lib/dnd';
|
import { computeSideForDragMove } from '../../../lib/dnd';
|
||||||
import { jotaiStore } from '../../../lib/jotai';
|
import { jotaiStore } from '../../../lib/jotai';
|
||||||
@@ -148,14 +152,14 @@ function TreeItem_<T extends { id: string }>({
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleEditBlur = useCallback(
|
const handleEditBlur = useCallback(
|
||||||
async function editBlur(e: React.FocusEvent<HTMLInputElement>) {
|
async function editBlur(e: ReactFocusEvent<HTMLInputElement>) {
|
||||||
await handleSubmitNameEdit(e.currentTarget);
|
await handleSubmitNameEdit(e.currentTarget);
|
||||||
},
|
},
|
||||||
[handleSubmitNameEdit],
|
[handleSubmitNameEdit],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleEditKeyDown = useCallback(
|
const handleEditKeyDown = useCallback(
|
||||||
async (e: React.KeyboardEvent<HTMLInputElement>) => {
|
async (e: ReactKeyboardEvent<HTMLInputElement>) => {
|
||||||
e.stopPropagation(); // Don't trigger other tree keys (like arrows)
|
e.stopPropagation(); // Don't trigger other tree keys (like arrows)
|
||||||
switch (e.key) {
|
switch (e.key) {
|
||||||
case 'Enter':
|
case 'Enter':
|
||||||
|
|||||||
Reference in New Issue
Block a user