-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New nav component and a new hook #2350
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
New nav component and a new hook #2350
Conversation
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.
Excellent work! There is only one thing which needs to change, and it's my fault 🤦♀️ because I told you that none of my Redux changes mattered...but I forgot about changing the toast from two actions to one. I will come up with a patch for that which just changes the actions and doesn't involve Redux Toolkit.
<NavMenuItem onClick={newSketch}>{t('Nav.File.New')}</NavMenuItem> | ||
<NavMenuItem | ||
hideIf={ | ||
!getConfig('LOGIN_ENABLED') || (project?.owner && !isUserOwner) |
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.
FYI that second condition is the negative of canEditProjectName
/selectCanEditSketch
.
Ok here's the fix I came up with for the Redux actions which will allow you to use p5.js-web-editor/client/modules/IDE/actions/toast.js Lines 9 to 16 in b22cc0a
with this:
|
Okay 👍 |
hey @lindapaiste! just made all the suggested changes to the PR please check it out. |
Changes:
added the new nav component, which was broken into several smaller components and a new hook useSketchActions
I have verified that this pull request:
npm run lint
)npm run test
)develop
branch.