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

feat(react): add providers & custom hooks #13

Merged
merged 19 commits into from
May 15, 2024

Conversation

movinsilva
Copy link
Contributor

Purpose

  • Add providers
    • AsgardeoProvider
    • BrandingPreferenceProvider
    • I18nProvider
  • Add custom hooks
    • useTranslations
    • useConfig
    • useAuthentication
  • Add util classes
    • CryptoUtils
    • SessionStorage

Related Issues

Related PRs

  • N/A

Checklist

  • e2e cypress tests locally verified.
  • Manual test round performed and verified.
  • UX/UI review done on the final implementation.
  • Documentation provided. (Add links if there are any)
  • Unit tests provided. (Add links if there are any)
  • Integration tests provided. (Add links if there are any)

Security checks

locale,
providerCustomization.name,
name: configData.name ?? 'carbon.super',
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's move to a seperate constant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wil address this in the next PR.

screen,
providerCustomization.type,
);
type: configData.type ?? BrandingPreferenceTypes.Org,
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's check and nullable checks if required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wil address this in the next PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The config cannot be nullable. Application cannot reach this far, if this is nullable. I think it is expected to break, in case this becomes nullable.

@@ -46,12 +47,17 @@
"sass": "^1.75.0",
"stylelint": "15.1.0",
"tslib": "^2.6.2",
"typescript": "^5.4.5"
"typescript": "5.1.6"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

caret ^ symbol will update to all future minor/patch versions, without incrementing the major version. (npm docs)
since current eslint version supports only upto typescript 5.2, need to avoid this.

@dasuni-30 dasuni-30 merged commit 2d995dc into asgardeo:main May 15, 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.

None yet

3 participants