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 9, 2024
1 parent 35b76d5 commit 8401cd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions packages/index/src/components/list-section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ export default function ListSection({ title, icon, videos, asideTitle, aside, mo
)}
</div>
<div className="list-body">
{videos ? (
videos.length > 0 ? (
videos.map((item, index) => {
if (isLive) return <LiveCard key={index} {...(item as any)} />
return <VideoCard key={index} info={item} />
})
) : (
<div className="empty">No Data</div>
)
{videos && videos?.length > 0 ? (
videos.map((item, index) => {
if (isLive) return <LiveCard key={index} {...(item as any)} />
return <VideoCard key={index} info={item} />
})
) : videos == undefined ? (
<div className="empty">No Data</div>
) : (
<span className="loading empty">loading···</span>
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/index/src/pages/index/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const indexConfig = [
]

export default function IndexPage() {
const [state, setState] = useState<R.Post[][] | null[]>([null, null])
const [state, setState] = useState<R.Post[][] | null[]>(Array.from({ length: indexConfig.length }, () => null))

// https://cors.moopa.my.id/?url=
// https://techz-cors-bypass.herokuapp.com/${res.url}
Expand Down

0 comments on commit 8401cd6

Please sign in to comment.