Commit 68733e00 authored by lynn's avatar lynn Committed by GitHub

feat: log is expert mode in amplitude user model (#4284)

* log is expert mode in amplitude user model

* remove extra
parent eb71b08c
...@@ -31,6 +31,7 @@ export enum CUSTOM_USER_PROPERTIES { ...@@ -31,6 +31,7 @@ export enum CUSTOM_USER_PROPERTIES {
ALL_WALLET_CHAIN_IDS = 'all_wallet_chain_ids', ALL_WALLET_CHAIN_IDS = 'all_wallet_chain_ids',
BROWSER = 'browser', BROWSER = 'browser',
DARK_MODE = 'is_dark_mode', DARK_MODE = 'is_dark_mode',
EXPERT_MODE = 'is_expert_mode',
SCREEN_RESOLUTION_HEIGHT = 'screen_resolution_height', SCREEN_RESOLUTION_HEIGHT = 'screen_resolution_height',
SCREEN_RESOLUTION_WIDTH = 'screen_resolution_width', SCREEN_RESOLUTION_WIDTH = 'screen_resolution_width',
WALLET_ADDRESS = 'wallet_address', WALLET_ADDRESS = 'wallet_address',
......
...@@ -18,6 +18,7 @@ import ErrorBoundary from '../components/ErrorBoundary' ...@@ -18,6 +18,7 @@ import ErrorBoundary from '../components/ErrorBoundary'
import Header from '../components/Header' import Header from '../components/Header'
import Polling from '../components/Header/Polling' import Polling from '../components/Header/Polling'
import Popups from '../components/Popups' import Popups from '../components/Popups'
import { useIsExpertMode } from '../state/user/hooks'
import DarkModeQueryParamReader from '../theme/DarkModeQueryParamReader' import DarkModeQueryParamReader from '../theme/DarkModeQueryParamReader'
import AddLiquidity from './AddLiquidity' import AddLiquidity from './AddLiquidity'
import { RedirectDuplicateTokenIds } from './AddLiquidity/redirects' import { RedirectDuplicateTokenIds } from './AddLiquidity/redirects'
...@@ -90,6 +91,7 @@ export default function App() { ...@@ -90,6 +91,7 @@ export default function App() {
const { pathname } = useLocation() const { pathname } = useLocation()
const currentPage = getCurrentPageFromLocation(pathname) const currentPage = getCurrentPageFromLocation(pathname)
const isDarkMode = useIsDarkMode() const isDarkMode = useIsDarkMode()
const isExpertMode = useIsExpertMode()
useAnalyticsReporter() useAnalyticsReporter()
initializeAnalytics() initializeAnalytics()
...@@ -110,6 +112,10 @@ export default function App() { ...@@ -110,6 +112,10 @@ export default function App() {
user.set(CUSTOM_USER_PROPERTIES.DARK_MODE, isDarkMode) user.set(CUSTOM_USER_PROPERTIES.DARK_MODE, isDarkMode)
}, [isDarkMode]) }, [isDarkMode])
useEffect(() => {
user.set(CUSTOM_USER_PROPERTIES.EXPERT_MODE, isExpertMode)
}, [isExpertMode])
return ( return (
<ErrorBoundary> <ErrorBoundary>
<DarkModeQueryParamReader /> <DarkModeQueryParamReader />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment