Clean code

This commit is contained in:
Nakul Nagargade 2025-07-07 19:08:23 +05:30
parent a77c54c736
commit bff1ec9807
3 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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`)

View file

@ -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);
}
},
}),