Skip to content
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

Added stepper with next and back button functionality #1053

Merged
merged 6 commits into from
Apr 24, 2023

Conversation

nmoon4
Copy link
Contributor

@nmoon4 nmoon4 commented Apr 20, 2023

  • Added the stepper component
  • The pages for the onboarding can be found in apps/user-profile/src/components/modules/UserOnboardingModal/PlatformOnboarding

@changeset-bot
Copy link

changeset-bot bot commented Apr 20, 2023

⚠️ No Changeset found

Latest commit: d0cb1dd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nmoon4 nmoon4 requested a review from judeamos April 20, 2023 22:49
Copy link
Contributor

@judeamos judeamos left a comment

Choose a reason for hiding this comment

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

Two code refinements needed, once done, then can approve


const backButton =
// This hides the button if index == 0
index == 0 ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

always use strict equality "===" instead of "=="


const backOnClickHandler = () => {
if (
(buttonConfig.back.useDefaultOnClick === undefined) |
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be simplified to if(buttonConfig?.back?.useDefaultOnClick) {...} if it's undefined it's going to be false.

Copy link
Contributor

@judeamos judeamos Apr 23, 2023

Choose a reason for hiding this comment

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

the ?. is known as Optional Chaining operator, it returns undefined if the properties does not exist in the object


const nextOnClickHandler = () => {
if (
(buttonConfig.next.useDefaultOnClick === undefined) |
Copy link
Contributor

Choose a reason for hiding this comment

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

Follow same logic as i've added for backOnClickHandler

@judeamos judeamos merged commit 517a29d into development/user-profile Apr 24, 2023
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.

2 participants