move DndContext defination position.

This commit is contained in:
Vixalie 2025-03-13 22:31:24 +08:00
parent fe62564f6e
commit 5b30d4c2bc
2 changed files with 24 additions and 24 deletions

View File

@ -1,7 +1,6 @@
// Load global styles
import './index.css';
// Load foundations
import { DndContext } from '@dnd-kit/core';
import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
@ -18,7 +17,6 @@ import Settings from './pages/Settings';
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<DndContext>
<Notifications>
<EstimWatchProvider>
<BrowserRouter>
@ -38,6 +36,5 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
</BrowserRouter>
</EstimWatchProvider>
</Notifications>
</DndContext>
</React.StrictMode>,
);

View File

@ -1,3 +1,4 @@
import { DndContext } from '@dnd-kit/core';
import { Icon } from '@iconify/react/dist/iconify.js';
import { useAtomValue } from 'jotai';
import { FC } from 'react';
@ -42,9 +43,11 @@ const PulseList: FC = () => {
</div>
<div className={styles.pulses}>
<ScrollArea enableY>
<DndContext>
<div className={styles.pulse_cards}>
{pulses.length === 0 && <div className="empty_prompt">No key pulses.</div>}
</div>
</DndContext>
</ScrollArea>
</div>
</>