File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { DropTarget } from 'react-dnd' ;
3-
43import { withRouter } from 'react-router-dom' ;
5- import { inject , observer } from 'app/componentConnectors' ;
64// @ts -ignore
75import TemplateIcon from '-!svg-react-loader!@codesandbox/common/lib/icons/template.svg' ;
8-
96import { Item } from '../Item' ;
107import { MAKE_TEMPLATE_DROP_KEY } from '../../Content/SandboxCard' ;
118
12- interface Props {
9+ interface ITemplateItemProps {
1310 currentPath : string ;
1411 teamId ?: string ;
15-
1612 canDrop ?: boolean ;
1713 isOver ?: boolean ;
1814 connectDropTarget ?: any ;
1915}
2016
21- const TemplateItemComponent = ( {
17+ const TemplateItemComponent : React . FC < ITemplateItemProps > = ( {
2218 currentPath,
2319 isOver,
2420 canDrop,
2521 connectDropTarget,
2622 teamId,
27- } : Props ) => {
23+ } : ITemplateItemProps ) => {
2824 const url = teamId
2925 ? `/dashboard/teams/${ teamId } /templates`
3026 : `/dashboard/templates` ;
@@ -76,8 +72,6 @@ export function collectTarget(connectMonitor, monitor) {
7672 } ;
7773}
7874
79- export const TemplateItem = inject ( 'store' , 'signals' ) (
80- DropTarget ( [ 'SANDBOX' ] , entryTarget , collectTarget ) (
81- withRouter ( observer ( TemplateItemComponent ) )
82- )
75+ export const TemplateItem = DropTarget ( [ 'SANDBOX' ] , entryTarget , collectTarget ) (
76+ withRouter ( TemplateItemComponent )
8377) ;
You can’t perform that action at this time.
0 commit comments