File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,17 @@ const TemplateItemComponent: FunctionComponent<Props> = ({
3030 : `/dashboard/templates` ;
3131
3232 return connectDropTarget (
33- < Item
34- active = { currentPath === path }
35- Icon = { TemplateIcon }
36- name = { teamId ? 'Team Templates' : 'My Templates' }
37- path = { path }
38- style = { isOver && canDrop ? { backgroundColor : 'rgba(0, 0, 0, 0.3)' } : { } }
39- />
33+ < div >
34+ < Item
35+ active = { currentPath === path }
36+ Icon = { TemplateIcon }
37+ name = { teamId ? 'Team Templates' : 'My Templates' }
38+ path = { path }
39+ style = {
40+ isOver && canDrop ? { backgroundColor : 'rgba(0, 0, 0, 0.3)' } : { }
41+ }
42+ />
43+ </ div >
4044 ) ;
4145} ;
4246
@@ -57,15 +61,15 @@ const entryTarget: DropTargetSpec<ComponentProps> = {
5761} ;
5862
5963const collectTarget : DropTargetCollector < CollectedProps > = (
60- { dropTarget } ,
61- { canDrop , isOver }
64+ connect ,
65+ monitor
6266) => ( {
63- canDrop : canDrop ( ) ,
67+ canDrop : monitor . canDrop ( ) ,
6468 // Call this function inside render()
6569 // to let React DnD handle the drag events:
66- connectDropTarget : dropTarget ( ) ,
70+ connectDropTarget : connect . dropTarget ( ) ,
6771 // You can ask the monitor about the current drag state:
68- isOver : isOver ( { shallow : true } ) ,
72+ isOver : monitor . isOver ( { shallow : true } ) ,
6973} ) ;
7074
7175type CollectedProps = {
You can’t perform that action at this time.
0 commit comments