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

View File

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