Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Standardize ShopifyProvider and createStorefrontClient regarding storeDomain #73

Closed
2 tasks
frehner opened this issue Nov 16, 2022 · 2 comments · Fixed by #78
Closed
2 tasks

Standardize ShopifyProvider and createStorefrontClient regarding storeDomain #73

frehner opened this issue Nov 16, 2022 · 2 comments · Fixed by #78
Labels
enhancement Enhancement to an existing feature react An issue related to the React package

Comments

@frehner
Copy link
Contributor

frehner commented Nov 16, 2022

createStorefrontClient takes in storeDomain like so:

storeDomain: 'hydrogen-preview',

ShopifyProvider takes in storeDomain like so:

storeDomain: `hydrogen-preview.myshopify.com`,

That's annoying and unnecessary. In addition, #70 was just merged that adds a function for getting the fully-qualified URL to createStorefrontClient, which includes the https://. So it would be good to add that to ShopifyProvider, too.

I feel like ideally we go the createStorefrontClient route and only ask for the name (e.g. just hydrogen-preview, and not hydrogen-preview.myshopify.com), but I'm open to other ideas.

#73 (comment)

@frehner frehner added needs: triage enhancement Enhancement to an existing feature react An issue related to the React package and removed needs: triage labels Nov 16, 2022
@elisenyang
Copy link
Contributor

@frehner can we assume the domain will always be https://{store_name}.myshopify.com ?

@frehner
Copy link
Contributor Author

frehner commented Nov 17, 2022

I believe so, yes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Enhancement to an existing feature react An issue related to the React package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants