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

[Fix] Unify all instances of fetching the production URL #1129

Open
dcshzj opened this issue Oct 21, 2022 · 0 comments
Open

[Fix] Unify all instances of fetching the production URL #1129

dcshzj opened this issue Oct 21, 2022 · 0 comments

Comments

@dcshzj
Copy link
Contributor

dcshzj commented Oct 21, 2022

There are 3 instances in which the production URL can be obtained:

  1. src/hooks/useSiteUrlHook.jsx - very legacy code that uses local storage, should be removed after it is confirmed that there are no usages
  2. src/hooks/settingsHooks/useUrlHook.jsx - somewhat legacy code, used on the Settings page, should be replaced because it uses a user-defined value
  3. src/hooks/settingsHooks/useGetSiteUrl.ts - newest code introduced as part of review requests, should be updated to use the new /v2/sites/:siteName/siteUrl endpoint.

All usages should be consolidated into the 3rd version for consistency.

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

No branches or pull requests

1 participant