mirror of
https://github.com/RealKai42/qwerty-learner.git
synced 2026-04-05 14:29:04 +08:00
Merge pull request #988 from RealKai42/kai-add-analysis
feat: remove word mixpanel
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
"@radix-ui/react-toggle-group": "^1.0.4",
|
||||
"@radix-ui/react-tooltip": "^1.0.7",
|
||||
"@tanstack/react-table": "^8.10.7",
|
||||
"@vercel/analytics": "^1.5.0",
|
||||
"animate.css": "^4.1.1",
|
||||
"canvas-confetti": "^1.6.0",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
|
||||
@@ -5,6 +5,7 @@ import { FriendLinks } from './pages/FriendLinks'
|
||||
import MobilePage from './pages/Mobile'
|
||||
import TypingPage from './pages/Typing'
|
||||
import { isOpenDarkModeAtom } from '@/store'
|
||||
import { Analytics } from '@vercel/analytics/react'
|
||||
import 'animate.css'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import mixpanel from 'mixpanel-browser'
|
||||
@@ -67,6 +68,7 @@ function Root() {
|
||||
</Routes>
|
||||
</Suspense>
|
||||
</BrowserRouter>
|
||||
<Analytics />
|
||||
</React.StrictMode>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
wordDictationConfigAtom,
|
||||
} from '@/store'
|
||||
import type { Word } from '@/typings'
|
||||
import { CTRL, getUtcStringForMixpanel, useMixPanelWordLogUploader } from '@/utils'
|
||||
import { CTRL, getUtcStringForMixpanel } from '@/utils'
|
||||
import { useSaveWordRecord } from '@/utils/db'
|
||||
import { useAtomValue } from 'jotai'
|
||||
import { useCallback, useContext, useEffect, useRef, useState } from 'react'
|
||||
@@ -41,7 +41,7 @@ export default function WordComponent({ word, onFinish }: { word: Word; onFinish
|
||||
const isIgnoreCase = useAtomValue(isIgnoreCaseAtom)
|
||||
const isShowAnswerOnHover = useAtomValue(isShowAnswerOnHoverAtom)
|
||||
const saveWordRecord = useSaveWordRecord()
|
||||
const wordLogUploader = useMixPanelWordLogUploader(state)
|
||||
// const wordLogUploader = useMixPanelWordLogUploader(state)
|
||||
const [playKeySound, playBeepSound, playHintSound] = useKeySounds()
|
||||
const pronunciationIsOpen = useAtomValue(pronunciationIsOpenAtom)
|
||||
const [isHoveringWord, setIsHoveringWord] = useState(false)
|
||||
@@ -254,14 +254,14 @@ export default function WordComponent({ word, onFinish }: { word: Word; onFinish
|
||||
if (wordState.isFinished) {
|
||||
dispatch({ type: TypingStateActionType.SET_IS_SAVING_RECORD, payload: true })
|
||||
|
||||
wordLogUploader({
|
||||
headword: word.name,
|
||||
timeStart: wordState.startTime,
|
||||
timeEnd: wordState.endTime,
|
||||
countInput: wordState.correctCount + wordState.wrongCount,
|
||||
countCorrect: wordState.correctCount,
|
||||
countTypo: wordState.wrongCount,
|
||||
})
|
||||
// wordLogUploader({
|
||||
// headword: word.name,
|
||||
// timeStart: wordState.startTime,
|
||||
// timeEnd: wordState.endTime,
|
||||
// countInput: wordState.correctCount + wordState.wrongCount,
|
||||
// countCorrect: wordState.correctCount,
|
||||
// countTypo: wordState.wrongCount,
|
||||
// })
|
||||
saveWordRecord({
|
||||
word: word.name,
|
||||
wrongCount: wordState.wrongCount,
|
||||
|
||||
@@ -2566,6 +2566,11 @@
|
||||
"@typescript-eslint/types" "5.59.6"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@vercel/analytics@^1.5.0":
|
||||
version "1.5.0"
|
||||
resolved "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.5.0.tgz#073f93694897414b21a8495e2619bbf64447dcaa"
|
||||
integrity sha512-MYsBzfPki4gthY5HnYN7jgInhAZ7Ac1cYDoRWFomwGHWEX7odTEzbtg9kf/QSo7XEsEAqlQugA6gJ2WS2DEa3g==
|
||||
|
||||
"@vitejs/plugin-react@^3.1.0":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.npmmirror.com/@vitejs/plugin-react/-/plugin-react-3.1.0.tgz"
|
||||
|
||||
Reference in New Issue
Block a user