Skip to content

Conversation

@NiloyDas789
Copy link
Contributor

No description provided.

Copy link
Member

@shuvomohajan shuvomohajan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

sheetConf={sheetConf}
setSheetConf={setSheetConf}
step={step}
setstep={setStep}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it camelCase

Comment on lines 45 to 48
if (authData.length === 1 && !isInfo && !isEdit) {
setSelectedUserId(authData[0].id);
} else if (!selectedUserId && authData.length > 0 && !isInfo && !isEdit) {
setSelectedUserId(authData[authData.length - 1].id);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

separate !isInfo && !isEdit from this conditions

}
}
}
}, [authData])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add other necessary dependencies here


if (step === 1 && isEdit) {

const updatedConf = { ...sheetConf }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary spread operation,

Spreading an object creates a shallow copy of that object, which allows you to modify the copy without affecting the original object. This is important when you want to follow immutability principles. In immutability, instead of changing an object's properties directly, you create a new object with the modified values.

@shuvomohajan shuvomohajan merged commit 19b549e into main Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants