mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Clean code
This commit is contained in:
parent
a77c54c736
commit
bff1ec9807
3 changed files with 5 additions and 5 deletions
|
|
@ -100,7 +100,7 @@ export const Container = React.memo(
|
|||
}
|
||||
},
|
||||
drop: (item, monitor) => {
|
||||
handleDrop(item, monitor, id);
|
||||
handleDrop(item, id);
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -174,8 +174,8 @@ export const Container = React.memo(
|
|||
currentMode === 'view'
|
||||
? computeViewerBackgroundColor(darkMode, canvasBgColor)
|
||||
: id === 'canvas'
|
||||
? canvasBgColor
|
||||
: '#f0f0f0',
|
||||
? canvasBgColor
|
||||
: '#f0f0f0',
|
||||
width: '100%',
|
||||
maxWidth: (() => {
|
||||
// For Main Canvas
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export const useCanvasDropHandler = ({ appType }) => {
|
|||
const currentLayout = useStore((state) => state.currentLayout, shallow);
|
||||
const setCurrentDragCanvasId = useGridStore((state) => state.actions.setCurrentDragCanvasId);
|
||||
|
||||
const handleDrop = async ({ componentType: draggedComponentType, component }, monitor, canvasId) => {
|
||||
const handleDrop = async ({ componentType: draggedComponentType, component }, canvasId) => {
|
||||
const realCanvasRef =
|
||||
!canvasId || canvasId === 'canvas'
|
||||
? document.getElementById(`real-canvas`)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export const DragLayer = ({ index, component, isModuleTab = false }) => {
|
|||
const clientOffset = monitor.getClientOffset();
|
||||
const currentDragCanvasId = useGridStore.getState().currentDragCanvasId;
|
||||
if (clientOffset) {
|
||||
handleDrop(item, monitor, currentDragCanvasId);
|
||||
handleDrop(item, currentDragCanvasId);
|
||||
}
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue