-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Refactor DashboardView.jsx: Convert legacy class component to functional component and remove unused code #2422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
useEffect(() => { | ||
if (collectionCreateVisible) { | ||
document.body.style.overflow = 'hidden'; | ||
} else { | ||
document.body.style.overflow = 'auto'; | ||
} | ||
}, [collectionCreateVisible]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please explain why this is necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra code was intended solely for testing scrolling behavior, which is already managed within the component.
I have now removed this test code and am ready to commit.
My apologies for any confusion. All changes have been completed, and I'm creating a new Pull Request for these updates.
const currentTab = selectedTabKey(); | ||
const owner = isOwner(); | ||
const { username } = params; | ||
const actions = renderActionButton(currentTab, username, t); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you eliminated the unnecessary arguments from the function, you no longer need to pass them here.
Ref #2358
Changes:
Refactor DashboardView.jsx: Convert legacy class component to functional component and remove unused code
I have verified that this pull request:
npm run lint
)npm run test
)develop
branch.Fixes #123