-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: ignore queries while switching platform #4730
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
Conversation
|
||
const convertToRouteHerf = (filter: FilterSelectProps, targetFilterKey: string) => { | ||
let path = filter.url | ||
let path = window.location.pathname |
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.
using the window object throws a build error, how about we just strip out the query parameters
// remove search query string when switching between platforms/frameworks
let path =
filter.url && filter.url.split ? filter.url.split('?')[0] : filter.url;
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.
thanks, @jacoblogan
I also found the fragment #
in the url also could cause the same issue. So I fallback to construct a URL
to extract the pathname
from it.
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.
LGTM
* fix: ignore queries while switching platform * fix: nextjs build failed with global object 'window'
* removes ionic * scours away ionic files * Remove typo * reverting yarn upgrade. we need to update the yarn lock * Fixed type for Auth.federatedSignIn() in lib/auth/js/social (#4699) * Fix lib-v1 error where refresh on root gave 404 (#4722) Co-authored-by: Thomas Leing <leint@amazon.com> * fix: edits to next.js getting started to bring it current (#4672) * fix: edits to next.js getting started to bring it current * updates to next.js hosting content * Removing Responsive Components from directory * Updating responsive documentation * improved docs for responsive components * Updating responsive documentation * merging * Adding link to theme * minor fix * another minor fix * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com> * Update cspell.json * requested edits to documentation * Update cspell.json * Add Android dev-preview files back (#4727) Co-authored-by: Thomas Leing <leint@amazon.com> * Update versions.ts * fix: ignore queries while switching platform (#4730) * fix: ignore queries while switching platform * fix: nextjs build failed with global object 'window' * Getting Started Tutorial : React update (#4676) * clarifying this needs a new terminal * updates * Update src/fragments/start/getting-started/common/prereq.mdx Co-authored-by: siegerts <stephen.siegert@gmail.com> * Update src/fragments/start/getting-started/react/api.mdx Co-authored-by: siegerts <stephen.siegert@gmail.com> * updating per review Co-authored-by: siegerts <stephen.siegert@gmail.com> * Facebook OAuth steps update (#4731) * Fixed type for Auth.federatedSignIn() in lib/auth/js/social * Fix facebook oauth setup steps * fix: add section to clarify steps to update Cognito user email address with example (#4476) * fix: add section to clarify steps to update Cognito user email address with example Related to: aws-amplify/amplify-js#987 aws-amplify/amplify-cli#10773 * remove extra space * React native getting started guide updates (#4714) * small updates to getting started guide * clarified the inspector panel location * Expo CLI wording update * remove react-native-picker and react-native package * update to RN getting started guide * updated installation of React Native CLI * update setup steps * removed broken closing tags * fixed tag * removed open tag without closing tag * added closing tag * removes ionic * omg merge conflict merginng. Much shame. Very sad. Co-authored-by: Tim Nguyen <timngyn@gmail.com> Co-authored-by: Dan Kiuna <dkkiuna11@gmail.com> Co-authored-by: Thomas Leing <bluezebragames@gmail.com> Co-authored-by: Thomas Leing <leint@amazon.com> Co-authored-by: Kevin Old <kevold@amazon.com> Co-authored-by: wpeck-amplify <107895670+wpeck-amplify@users.noreply.github.com> Co-authored-by: wrpeck <40308049+wrpeck@users.noreply.github.com> Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com> Co-authored-by: dengdan154 <85711456+dengdan154@users.noreply.github.com> Co-authored-by: Di Wu <5d@users.noreply.github.com> Co-authored-by: siegerts <stephen.siegert@gmail.com> Co-authored-by: Abdallah Shaban <awshaban@amazon.com>
Issue #, if available:
#4729
Description of changes:
window.location
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.