chore: remove unused safari mark

This commit is contained in:
EnixCoda 2022-07-04 21:51:46 +08:00
parent 3e89db3feb
commit 3ce088cf7b
2 changed files with 1 additions and 10 deletions

View file

@ -11,7 +11,7 @@ import { platform } from 'platforms'
import * as React from 'react'
import { cx } from 'utils/cx'
import * as DOMHelper from 'utils/DOMHelper'
import { detectBrowser, run } from 'utils/general'
import { run } from 'utils/general'
import { useLoadedContext } from 'utils/hooks/useLoadedContext'
import { useOnPJAXDone, usePJAX } from 'utils/hooks/usePJAX'
import { useStateIO } from 'utils/hooks/useStateIO'
@ -48,10 +48,6 @@ export function SideBar() {
}
}, [hasMetaData]) // eslint-disable-line react-hooks/exhaustive-deps
React.useEffect(() => {
if (detectBrowser() === 'Safari') DOMHelper.markGitakoSafariFlag()
}, [])
const { sidebarToggleMode, intelligentToggle } = configContext.value
const $shouldShow = useStateIO(() =>
intelligentToggle === null

View file

@ -19,11 +19,6 @@ export function markGitakoReadyState(ready: boolean) {
return setGitakoBodyClass(readyClassName, ready)
}
export function markGitakoSafariFlag(enable = true) {
const className = 'gitako-safari'
return setGitakoBodyClass(className, enable)
}
/**
* if should show gitako, then move body right to make space for showing gitako
* otherwise, hide the space