stephenLYZ commented on code in PR #21312:
URL: https://github.com/apache/superset/pull/21312#discussion_r970361942
##########
superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx:
##########
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React from 'react';
+import React, { useEffect } from 'react';
Review Comment:
Remove no used import will fix lint.
##########
superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx:
##########
@@ -80,7 +80,11 @@ export default function DatasourcePanelDragOption(
};
return (
- <DatasourceItemContainer data-test="DatasourcePanelDragOption" ref={drag}>
+ <DatasourceItemContainer
Review Comment:
We can use `styled-component` property instead of inline style. Like this:
```jsx
<DatasourceItemContainer isDragging={isDragging}
data-test="DatasourcePanelDragOption" ref={drag} />
const DatasourceItemContainer = styled.div`
${({ theme, isDragging }) => css`
cursor: ${isDragging ? 'grabbing': 'pointer'};
...
`}
`;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]