-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize Server-side performance (#667)
* Use LocaleContext and SiteContext * Declare AppConfigProvider * Optimization use `AppConfig` context & `urlTemplateLiteral` without loops * Fix missing forward slash on `urlTemplateLiteral` * Clean up * Remove `buildPathWithUrlConfig()` & Start fixing test * Fix some tests * Clean up * Combine default cases * Update url.js * Refactor switch * Add docs * Minor naming * Update packages/template-retail-react-app/app/utils/url.js Co-authored-by: Will Harney <[email protected]> * PR Feedback rename c to config * Update packages/template-retail-react-app/app/components/link/index.jsx Co-authored-by: Will Harney <[email protected]> * PR Feedback naming * Update `getPathWithLocale` signature & Clean up * Fix tests * Fix more tests * Small refactor using site and locale references in `createUrlTemplate` * LocaleProvider use locale id * Fix disallowParams test * Footer Locale Select using the right params * Add `createUrlTemplate` tests * Small tweaks to `createUrlTemplate` tests * Run all tests on link component * Fix link tests * Small naming * Remove `homeUrlBuilder` * Run all url tests * Extend `createUrlTemplate` to replace `homeUrlBuilder` * URL templateConfig not needed * Adjust `createUrlTemplate` home extension * PR Feedback * Test `useUrlTemplate` Vincent M idea * lint * Move SiteProvider and LocaleProvider to AppConfig * Refactor Site, Locale and UrlTemplate Providers into `MultiSiteProvider` * Rename `useUrlTemplate` hook to `useMultiSite` hook * PR Feedback use `useCallback` in `useMultiSite` hook * Rename `fillUrlTemplate` to `buildUrl` Co-authored-by: Will Harney <[email protected]>
- Loading branch information
Showing
33 changed files
with
600 additions
and
644 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.