@@ -4,7 +4,7 @@ import { useAppDispatch, useAppSelector, useEffectMount } from '@/hooks'
44
55import { selectOptions } from '../global/optionsSlice'
66import { Portal } from '@/components/Portal'
7- import { findElement , findAllElement , findElementByXPath } from '@/utils'
7+ import { findElementByXPath } from '@/utils'
88import Predict from './Predict'
99import { useUrlChange } from './Item'
1010import Title from './Title'
@@ -123,21 +123,18 @@ export const BetaApp: FC = () => {
123123 ( showPredict || realTimePredict ) &&
124124 ( showPredictordelta || showNewRating || showOldRating )
125125
126- useEffectMount (
127- async state => {
128- if ( ! widescreen ) return
129- let p = titleRoot
130- while ( p && p !== document . body ) {
131- if ( getComputedStyle ( p ) . maxWidth !== 'none' ) {
132- p . style . maxWidth = 'unset'
133- p . style . alignItems = 'center'
134- break
135- }
136- p = p . parentElement !
126+ useEffectMount ( async ( ) => {
127+ if ( ! widescreen ) return
128+ let p = titleRoot
129+ while ( p && p !== document . body ) {
130+ if ( getComputedStyle ( p ) . maxWidth !== 'none' ) {
131+ p . style . maxWidth = 'unset'
132+ p . style . alignItems = 'center'
133+ break
137134 }
138- } ,
139- [ widescreen , titleRoot ]
140- )
135+ p = p . parentElement !
136+ }
137+ } , [ widescreen , titleRoot ] )
141138 if ( ! contestInfo || ! rows ) return null
142139
143140 return (
0 commit comments