Skip to content

Commit ae42c5e

Browse files
committed
fix: fix lint
1 parent d0d179e commit ae42c5e

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

src/content/pages/ranking/BetaApp.tsx

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useAppDispatch, useAppSelector, useEffectMount } from '@/hooks'
44

55
import { selectOptions } from '../global/optionsSlice'
66
import { Portal } from '@/components/Portal'
7-
import { findElement, findAllElement, findElementByXPath } from '@/utils'
7+
import { findElementByXPath } from '@/utils'
88
import Predict from './Predict'
99
import { useUrlChange } from './Item'
1010
import 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 (

src/content/pages/ranking/Predict.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { memo, useEffect } from 'react'
1+
import { FC, memo, useEffect } from 'react'
22

33
import { fetchPrediction } from './rankSlice'
44
import { Portal } from '@/components/Portal'
@@ -83,7 +83,7 @@ type TDWrapProps = React.HTMLAttributes<HTMLElement> & {
8383
children?: React.ReactNode
8484
}
8585

86-
export const TDWrap = ({ beta, children, ...props }: TDWrapProps) => {
86+
export const TDWrap: FC<TDWrapProps> = ({ beta, children, ...props }) => {
8787
if (beta) {
8888
return <div {...props}>{children}</div>
8989
}

0 commit comments

Comments
 (0)