Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Aug 10, 2024
1 parent 256dcea commit 526391b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/index/src/components/list-section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function ListSection({ title, icon, videos, asideTitle, aside, mo
if (isLive) return <LiveCard key={index} {...(item as any)} />
return <VideoCard key={index} info={item} />
})
) : videos == undefined ? (
) : videos === undefined ? (
<div className="empty">No Data</div>
) : (
<span className="loading empty">loadingΒ·Β·Β·</span>
Expand Down
5 changes: 3 additions & 2 deletions packages/index/src/components/rank-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import classNames from 'classnames'
import { cliclisAdapter } from '../../enime.adp'

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

useEffect(() => {
Expand All @@ -18,11 +18,12 @@ export default function RankList() {
return (
<div className="rank-video-list">
<div className="tags" style={{ marginBottom: '6px' }}>
{[7, 30, 120, 365].map((n) => (
{[3, 7, 30, 90, 365].map((n) => (
<a
className={classNames('tag is-hoverable', {
'is-primary': day == n,
})}
key={n}
onClick={() => {
setDay(n)
}}
Expand Down
12 changes: 6 additions & 6 deletions packages/index/src/pages/index/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ const indexConfig = [
title: 'Recommends',
query: 'type=recommends&title=recommends',
icon: require('../../assets/recommend.svg').default,
remoto: recommends,
remote: recommends,
},
{
title: `❀️‍πŸ”₯I Miss U`,
remoto: `/posts?status=public&sort=&tag=ζ‹ηˆ±&page=1&pageSize=24`,
title: `❀️‍πŸ”₯MISS U`,
remote: `/posts?status=public&sort=&tag=ζ‹ηˆ±&page=1&pageSize=24`,
query: `tag=ζ‹ηˆ±&title=❀️‍πŸ”₯`,
},
{
title: 'Latest Releases',
remoto: `/posts?status=&sort=&tag=&uid=&page=1&pageSize=24`,
title: '✨Latest Releases',
remote: `/posts?status=&sort=&tag=&uid=&page=1&pageSize=24`,
query: 'tag=all&title=Latest Releases',
},
]
Expand All @@ -38,7 +38,7 @@ export default function IndexPage() {
// https://techz-cors-bypass.herokuapp.com/${res.url}
useEffect(() => {
Promise.allSettled(
indexConfig.map(({ remoto }) => (typeof remoto == 'string' ? corsAxios.get(remoto) : remoto))
indexConfig.map(({ remote: remote }) => (typeof remote == 'string' ? corsAxios.get(remote) : remote))
).then((_resp) => {
const resp = _resp.map(({ value }: any) => {
if (value.posts) {
Expand Down
10 changes: 6 additions & 4 deletions packages/index/src/pages/tag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ export default function SearchPage() {
}

useEffect(() => {
if (tag || tag == 'all') {
if (tag) {
setPosts(null)
corsAxios.get(`/posts?status=public&sort=&tag=${tag}&uid=&page=${page}&pageSize=24`).then((it) => {
setPosts(cliclisAdapter(it.posts))
})
corsAxios
.get(`/posts?status=public&sort=&tag=${tag == 'all' ? '' : tag}&uid=&page=${page}&pageSize=24`)
.then((it) => {
setPosts(cliclisAdapter(it.posts))
})
} else {
store
.keys()
Expand Down

0 comments on commit 526391b

Please sign in to comment.