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

Add express login link to furever #211

Merged
merged 3 commits into from
Jan 23, 2025
Merged

Conversation

dhiggins-stripe
Copy link
Contributor

@dhiggins-stripe dhiggins-stripe commented Jan 23, 2025

When merchant has express dashboard access, display link to open express dashboard

Screen.Recording.2025-01-23.at.2.33.27.PM.mov


const expressDashboardLoginLink = useMemo(async () => {
if (hasExpressDashboardAccess) {
const res = await fetch('/api/login_link');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

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');
Copy link
Collaborator

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?

Copy link
Collaborator

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!

@dhiggins-stripe dhiggins-stripe merged commit fee19df into master Jan 23, 2025
2 checks passed
@dhiggins-stripe dhiggins-stripe deleted the dhiggins-add-express-login branch January 23, 2025 20:59
@Deezy33-creator
Copy link

www.adamsoutdoor.com

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.

4 participants