aws-amplify / amplify-codegen-ui

Generate React components for use in an AWS Amplify project.
Apache License 2.0
32 stars 26 forks source link

fix: migrate useAuth hook for v6 #1137

Closed letsbelopez closed 11 months ago

letsbelopez commented 11 months ago

Problem

We need to migrate the useAuth hook for v6

Solution

Migrate it over

Additional Notes

Links

Ticket

GitHub issue:

Other links

Verification

Manual tests

Automated tests

Housekeeping

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

codecov-commenter commented 11 months ago

Codecov Report

Merging #1137 (8a82f39) into main (69ece2f) will increase coverage by 0.00%. The diff coverage is 100.00%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1137/graphs/tree.svg?width=650&height=150&src=pr&token=opw1LYK6Jn&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify)](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1137?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify) ```diff @@ Coverage Diff @@ ## main #1137 +/- ## ======================================= Coverage 93.85% 93.86% ======================================= Files 149 150 +1 Lines 6104 6112 +8 Branches 1834 1836 +2 ======================================= + Hits 5729 5737 +8 Misses 357 357 Partials 18 18 ``` | [Files](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1137?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify) | Coverage Δ | | |---|---|---| | [...ges/codegen-ui-react/lib/imports/import-mapping.ts](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1137?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify#diff-cGFja2FnZXMvY29kZWdlbi11aS1yZWFjdC9saWIvaW1wb3J0cy9pbXBvcnQtbWFwcGluZy50cw==) | `100.00% <100.00%> (ø)` | | | [...gen-ui-react/lib/react-studio-template-renderer.ts](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1137?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify#diff-cGFja2FnZXMvY29kZWdlbi11aS1yZWFjdC9saWIvcmVhY3Qtc3R1ZGlvLXRlbXBsYXRlLXJlbmRlcmVyLnRz) | `93.65% <100.00%> (+0.03%)` | :arrow_up: | | [...-react/lib/react-utils-studio-template-renderer.ts](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1137?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify#diff-cGFja2FnZXMvY29kZWdlbi11aS1yZWFjdC9saWIvcmVhY3QtdXRpbHMtc3R1ZGlvLXRlbXBsYXRlLXJlbmRlcmVyLnRz) | `96.07% <100.00%> (+0.16%)` | :arrow_up: | | [...n-ui-react/lib/utils-file-functions/hooks/index.ts](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1137?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify#diff-cGFja2FnZXMvY29kZWdlbi11aS1yZWFjdC9saWIvdXRpbHMtZmlsZS1mdW5jdGlvbnMvaG9va3MvaW5kZXgudHM=) | `100.00% <100.00%> (ø)` | | | [...ui-react/lib/utils-file-functions/hooks/useAuth.ts](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1137?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify#diff-cGFja2FnZXMvY29kZWdlbi11aS1yZWFjdC9saWIvdXRpbHMtZmlsZS1mdW5jdGlvbnMvaG9va3MvdXNlQXV0aC50cw==) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1137?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1137?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify). Last update [69ece2f...8a82f39](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1137?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify).