-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add express login link to furever #211
Conversation
app/(dashboard)/settings/layout.tsx
Outdated
|
||
const expressDashboardLoginLink = useMemo(async () => { | ||
if (hasExpressDashboardAccess) { | ||
const res = await fetch('/api/login_link'); |
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.
Can we abstract this into a hook, like https://github.com/stripe/stripe-connect-furever-demo/blob/master/app/hooks/useFinancialAccount.ts?
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 am a bit disappointed we don't use react-query 🤦
|
||
useEffect(() => { | ||
const fetchLink = async () => { | ||
const res = await fetch('/api/login_link'); |
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.
@dhiggins-stripe this is going to fail for anyone that is not express. Can we add an if
here to only make this request if it is an express account?
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 see you have the check above, but it is best to not make the API request at all in that case!
When merchant has express dashboard access, display link to open express dashboard
Screen.Recording.2025-01-23.at.2.33.27.PM.mov