mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 20:00:29 +01:00
Minor tweaks
This commit is contained in:
@@ -3,6 +3,7 @@ import type { ForwardedRef, KeyboardEvent, MouseEvent as ReactMouseEvent } from
|
||||
import React, { forwardRef, Fragment, memo, useCallback, useMemo, useRef, useState } from 'react';
|
||||
import type { XYCoord } from 'react-dnd';
|
||||
import { useDrag, useDrop } from 'react-dnd';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import { useActiveRequest } from '../hooks/useActiveRequest';
|
||||
import { useCreateRequest } from '../hooks/useCreateRequest';
|
||||
import { useDeleteRequest } from '../hooks/useDeleteRequest';
|
||||
@@ -81,6 +82,11 @@ export const Sidebar = memo(function Sidebar({ className }: Props) {
|
||||
return (
|
||||
<div className="relative">
|
||||
{/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}
|
||||
{isResizing && (
|
||||
<Helmet>
|
||||
<html className="cursor-ew-resize" />
|
||||
</Helmet>
|
||||
)}
|
||||
<div
|
||||
aria-hidden
|
||||
className="group absolute z-10 right-0 w-2 top-0 bottom-0 cursor-ew-resize flex justify-end"
|
||||
|
||||
@@ -3,6 +3,7 @@ import classnames from 'classnames';
|
||||
import React, { Fragment, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import type { XYCoord } from 'react-dnd';
|
||||
import { useDrag, useDrop } from 'react-dnd';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { DropMarker } from '../DropMarker';
|
||||
import { Checkbox } from './Checkbox';
|
||||
@@ -151,7 +152,6 @@ export const PairEditor = memo(function PairEditor({
|
||||
onEnd={handleEnd}
|
||||
onMove={handleMove}
|
||||
/>
|
||||
{hoveredIndex === pairs.length && <DropMarker />}
|
||||
</Fragment>
|
||||
);
|
||||
})}
|
||||
@@ -232,7 +232,7 @@ const FormRow = memo(function FormRow({
|
||||
[onMove],
|
||||
);
|
||||
|
||||
const [, connectDrag] = useDrag<PairContainer>(
|
||||
const [, connectDrag] = useDrag(
|
||||
{
|
||||
type: ItemTypes.ROW,
|
||||
item: () => pairContainer,
|
||||
|
||||
Reference in New Issue
Block a user