-
Notifications
You must be signed in to change notification settings - Fork 89
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
chore: update embedded widget codebase #2707
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎
Footnotes |
HOME: '/', | ||
SWAP: `/:chainId?${TRADE_WIDGET_PREFIX}/swap/:inputCurrencyId?/:outputCurrencyId?`, | ||
LIMIT_ORDER: `/:chainId?${TRADE_WIDGET_PREFIX}/limit-orders/:inputCurrencyId?/:outputCurrencyId?`, | ||
ADVANCED_ORDERS: `/:chainId?${TRADE_WIDGET_PREFIX}/advanced-orders/:inputCurrencyId?/:outputCurrencyId?`, |
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.
aha, ok, so you reuse the routes, cool!
|
||
if (isDarkMode === darkModeRef.current) return | ||
|
||
dispatch(updateUserDarkMode({ userDarkMode: isDarkMode })) |
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.
in some other params, we remove the param from the URL once used. Not saying we should do it here, just wondering if it makes sense
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.
For now this param is only for widget where we don't see a URL of iframe. But I see what you mean, probably we would need to clean up the URL
@@ -7,9 +7,9 @@ import { Identify, identify, init, track } from '@amplitude/analytics-browser' | |||
* member of the organization on Amplitude to view details. | |||
*/ | |||
export function initializeAnalytics(isDevEnvironment = process.env.NODE_ENV === 'development') { | |||
const API_KEY = process.env.REACT_APP_AMPLITUDE_KEY | |||
if (isDevEnvironment || !API_KEY) return | |||
if (isDevEnvironment) return |
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.
I added this cause testing locally in "production mode" would break herre, and i would think is not a mandatory param, right?
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.
Yes, I just inherited it from the previous branch
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.
I'm bringing this back, since it breaks the e2e #2733
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.
Soft approve :)
Pls, don't keep adding too many changeds to this PR since its already big
if possible, lets consolidate all this PRs and reiterate on the consolidation branch
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.
This PR is GREAT!
Summary
serve
configuration for Vite