-
Notifications
You must be signed in to change notification settings - Fork 0
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
Back Navigation/Favicon/Home page Icon #66
Conversation
const backDestination = defaultReturnTo | ||
? () => history.push(defaultReturnTo) | ||
: () => history.goBack(); |
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.
I think this simplification works. However, in order to cover all use cases as defined by our decision table, let's make defaultReturnTo
required.
}: { | ||
defaultReturnTo: string; | ||
defaultReturnTo?: string; |
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.
Per suggestion to make this required, can we use PropTypes in functional components? It's been a while since I did this.
defaultReturnTo?: string; | |
defaultReturnTo: PropTypes.string.isRequired. |
|
||
return ( | ||
<Button onClick={backDestination} variant="linkWhite" arrowVariant="before"> | ||
Back to Service Listings | ||
{content} |
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.
What do you think about making this the implicit {children}
passed in as a block to allow for more flexibility?
Pull Request Template
Description
This PR:
How Can This Be Tested/Reviewed?