-
Notifications
You must be signed in to change notification settings - Fork 199
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: reworked back to portal button logic #2375
Conversation
|
WalkthroughThe recent updates focus on enhancing the app's exit functionality by integrating a new Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
PR Description updated to latest commit (be3bb1a) |
1 similar comment
PR Description updated to latest commit (be3bb1a) |
PR Review 🔍(Review updated until commit be3bb1a)
Code feedback:
|
Persistent review updated to latest commit be3bb1a |
PR Code Suggestions ✨
|
PR Code Suggestions ✨
|
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.
Actionable comments posted: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- apps/kyb-app/src/components/layouts/AppShell/Navigation.tsx (2 hunks)
- apps/kyb-app/src/hooks/useAppExit/useAppExit.ts (1 hunks)
- apps/kyb-app/src/pages/CollectionFlow/components/pages/Approved/Approved.tsx (2 hunks)
- apps/kyb-app/src/pages/CollectionFlow/components/pages/Success/Success.tsx (2 hunks)
Additional comments not posted (4)
apps/kyb-app/src/pages/CollectionFlow/components/pages/Success/Success.tsx (1)
32-34
: Ensure proper conditional rendering.The conditional rendering of the button based on
isExitAvailable
andcustomer?.displayName
is correct and ensures the button is only shown when appropriate.apps/kyb-app/src/pages/CollectionFlow/components/pages/Approved/Approved.tsx (1)
32-34
: Ensure proper conditional rendering.The conditional rendering of the button based on
isExitAvailable
andcustomer
is correct and ensures the button is only shown when appropriate.apps/kyb-app/src/components/layouts/AppShell/Navigation.tsx (2)
29-31
: Ensure proper function call.The
exit
function is correctly called when theonPrevious
function is triggered, ensuring the appropriate exit action is taken.
33-33
: Ensure proper conditional rendering.The conditional rendering of the button based on
isExitAvailable
andisFirstStep
is correct and ensures the button is only shown when appropriate.
User description
Description
Reworked Back to portal rendering logic.
Back to portal button will be rendered:
config.kybOnExitAction
is set tosend-event
config.kybOnExitAction
is set toredirect-to-customer-portal
and websiteUrl is exists incustomer
.PR Type
enhancement
Description
exit
andisExitAvailable
fromuseAppExit
.Changes walkthrough 📝
Navigation.tsx
Enhance exit logic and conditional rendering in Navigation
apps/kyb-app/src/components/layouts/AppShell/Navigation.tsx
exitFromApp
with destructuredexit
andisExitAvailable
fromuseAppExit
.null
if it is the first step and exit is notavailable.
useAppExit.ts
Extend useAppExit hook to include exit availability logic
apps/kyb-app/src/hooks/useAppExit/useAppExit.ts
isExitAvailable
, determiningavailability based on
kybOnExitAction
andcustomer.websiteUrl
.Approved.tsx
Update exit logic in Approved page
apps/kyb-app/src/pages/CollectionFlow/components/pages/Approved/Approved.tsx
exit
andisExitAvailable
fromuseAppExit
.isExitAvailable
.Success.tsx
Update exit logic in Success page
apps/kyb-app/src/pages/CollectionFlow/components/pages/Success/Success.tsx
exit
andisExitAvailable
fromuseAppExit
.isExitAvailable
.Summary by CodeRabbit
New Features
isExitAvailable
to conditionally display an exit button based on availability.Improved Functionality
Navigation
,Approved
, andSuccess
) for a more consistent user experience.