Skip to content

Commit

Permalink
fix: fix cannot have two HTML5 backends at the same time.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 20, 2023
1 parent 3b7e4ce commit 7fef56f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DndProvider } from 'react-dnd';
import { FC, PropsWithChildren, useEffect, useState } from 'react';
import { FC, PropsWithChildren } from 'react';
import { HTML5Backend } from 'react-dnd-html5-backend';
import { Tabs } from './Tabs';
import { Provider } from './store';
Expand All @@ -23,7 +23,7 @@ const TabContainer: FC<PropsWithChildren<TabsProps>> = ({ activeKey, onTabClick,
const tabDrop = useEventCallback(onTabDrop!);

return (
<DndProvider backend={HTML5Backend}>
<DndProvider backend={HTML5Backend} context={window}>
<Provider init={{ data: [], activeKey, onTabClick: tabClick, onTabDrop: tabDrop }}>
<Tabs {...props} activeKey={activeKey} />
</Provider>
Expand Down

0 comments on commit 7fef56f

Please sign in to comment.