Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
68733e00
Unverified
Commit
68733e00
authored
Aug 04, 2022
by
lynn
Committed by
GitHub
Aug 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: log is expert mode in amplitude user model (#4284)
* log is expert mode in amplitude user model * remove extra
parent
eb71b08c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
constants.ts
src/components/AmplitudeAnalytics/constants.ts
+1
-0
App.tsx
src/pages/App.tsx
+6
-0
No files found.
src/components/AmplitudeAnalytics/constants.ts
View file @
68733e00
...
...
@@ -31,6 +31,7 @@ export enum CUSTOM_USER_PROPERTIES {
ALL_WALLET_CHAIN_IDS
=
'
all_wallet_chain_ids
'
,
BROWSER
=
'
browser
'
,
DARK_MODE
=
'
is_dark_mode
'
,
EXPERT_MODE
=
'
is_expert_mode
'
,
SCREEN_RESOLUTION_HEIGHT
=
'
screen_resolution_height
'
,
SCREEN_RESOLUTION_WIDTH
=
'
screen_resolution_width
'
,
WALLET_ADDRESS
=
'
wallet_address
'
,
...
...
src/pages/App.tsx
View file @
68733e00
...
...
@@ -18,6 +18,7 @@ import ErrorBoundary from '../components/ErrorBoundary'
import
Header
from
'
../components/Header
'
import
Polling
from
'
../components/Header/Polling
'
import
Popups
from
'
../components/Popups
'
import
{
useIsExpertMode
}
from
'
../state/user/hooks
'
import
DarkModeQueryParamReader
from
'
../theme/DarkModeQueryParamReader
'
import
AddLiquidity
from
'
./AddLiquidity
'
import
{
RedirectDuplicateTokenIds
}
from
'
./AddLiquidity/redirects
'
...
...
@@ -90,6 +91,7 @@ export default function App() {
const
{
pathname
}
=
useLocation
()
const
currentPage
=
getCurrentPageFromLocation
(
pathname
)
const
isDarkMode
=
useIsDarkMode
()
const
isExpertMode
=
useIsExpertMode
()
useAnalyticsReporter
()
initializeAnalytics
()
...
...
@@ -110,6 +112,10 @@ export default function App() {
user
.
set
(
CUSTOM_USER_PROPERTIES
.
DARK_MODE
,
isDarkMode
)
},
[
isDarkMode
])
useEffect
(()
=>
{
user
.
set
(
CUSTOM_USER_PROPERTIES
.
EXPERT_MODE
,
isExpertMode
)
},
[
isExpertMode
])
return
(
<
ErrorBoundary
>
<
DarkModeQueryParamReader
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment