Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya authored Aug 9, 2024
1 parent d637540 commit 7bbe553
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/index/src/components/rank-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ import './index.scss'
import { useEffect, useState } from 'react'
import { corsAxios } from '@web/shared/constants'
import classNames from 'classnames'
import { clicliAdapter } from '../../enime.adp'
import { cliclisAdapter } from '../../enime.adp'

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

useEffect(() => {
corsAxios.get(`https://www.clicli.cc/rank?day=${day}`).then((rsp) => {
setList(clicliAdapter(rsp.posts))
setList(cliclisAdapter(rsp.posts))
})
}, [day])

return (
<div className="rank-video-list">
<div className="tags" style={{ marginBottom: '6px' }}>
{[7, 30, 120, 365].map((n) => (
<span
<a
className={classNames('tag is-hoverable', {
'is-primary': day == n,
})}
Expand All @@ -28,7 +28,7 @@ export default function RankList() {
}}
>
{n} DAY
</span>
</a>
))}
</div>
{list ? (
Expand Down
3 changes: 2 additions & 1 deletion packages/index/src/pages/index/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export default function IndexPage() {
Promise.allSettled([
// corsAxios.get(`https://www.clicli.cc/users?level=4&page=1&pageSize=9`),
recommends,
corsAxios.get('https://www.clicli.cc/posts?status=public&sort=&tag=%E6%8E%A8%E8%8D%90&uid=&page=1&pageSize=12'),
corsAxios.get(`https://www.clicli.cc/posts?status=public&sort=新番%2C完结&tag=7月新番&page=1&pageSize=99`),
// corsAxios.get('https://www.clicli.cc/posts?status=public&sort=&tag=%E6%8E%A8%E8%8D%90&uid=&page=1&pageSize=12'),
corsAxios.get('https://www.clicli.cc/posts?status=public&sort=&tag=&uid=&page=1&pageSize=24'),
] as any).then((_resp) => {
const resp = _resp.map(({ value }: any) => {
Expand Down

0 comments on commit 7bbe553

Please sign in to comment.