Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Sep 21, 2024
1 parent e1cff11 commit ec538fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/index/src/components/rank-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import classNames from 'classnames'
import { cliclisAdapter } from '../../enime.adp'

export default function RankList() {
const [day, setDay] = useState(3)
const [day, setDay] = useState(90)
const [list, setList] = useState<R.Post[]>()

useEffect(() => {
corsAxios.get(`/rank?day=${day}`).then((rsp) => {
setList(cliclisAdapter(rsp.posts))
setList(cliclisAdapter(rsp.posts) || [])
})
}, [day])

Expand All @@ -21,7 +21,7 @@ export default function RankList() {
{[3, 7, 30, 90, 365].map((n) => (
<a
className={classNames('tag is-hoverable', {
'is-primary': day == n,
'is-primary': day == n
})}
key={n}
onClick={() => {
Expand Down

0 comments on commit ec538fb

Please sign in to comment.