mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Fix history index tracking
This commit is contained in:
@@ -31,6 +31,7 @@ export function VersionProvider({ children }: { children: ComponentChildren }) {
|
||||
|
||||
useEffect(() => {
|
||||
if (VersionIds.includes(targetVersion as VersionId) && version !== targetVersion) {
|
||||
Analytics.setVersion(targetVersion as VersionId)
|
||||
setVersion(targetVersion as VersionId)
|
||||
}
|
||||
}, [version, targetVersion])
|
||||
@@ -46,6 +47,10 @@ export function VersionProvider({ children }: { children: ComponentChildren }) {
|
||||
setVersion(newVersion)
|
||||
}, [targetVersion])
|
||||
|
||||
useEffect(() => {
|
||||
Analytics.setVersion(version)
|
||||
}, [])
|
||||
|
||||
const value: Version = {
|
||||
version,
|
||||
changeVersion,
|
||||
|
||||
Reference in New Issue
Block a user