Fix TikTok page TypeScript build for channel board
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
7090dd3efe
commit
0bf692e943
@ -278,6 +278,23 @@ export default function TikTokPage() {
|
||||
[],
|
||||
);
|
||||
|
||||
const displayChannels: BoardChannel[] = boardChannels.length
|
||||
? boardChannels
|
||||
: channels.map((c) => ({
|
||||
id: c.id,
|
||||
name: c.name,
|
||||
tiktok_username: c.tiktok_username,
|
||||
enabled: c.enabled,
|
||||
authorized: c.authorized,
|
||||
used: 0,
|
||||
scheduled: 0,
|
||||
uploaded: 0,
|
||||
pending: 0,
|
||||
gap: 9,
|
||||
max_met: false,
|
||||
daily_max: 9,
|
||||
}));
|
||||
|
||||
if (loading && !status) {
|
||||
return (
|
||||
<Shell>
|
||||
@ -539,7 +556,7 @@ export default function TikTokPage() {
|
||||
<span className="text-[11px] text-slate-500">北京日 {beijingWindow || "—"} · 每账号 9 条/日</span>
|
||||
</div>
|
||||
<div className="grid gap-3 sm:grid-cols-2">
|
||||
{(boardChannels.length ? boardChannels : channels).map((ch) => {
|
||||
{displayChannels.map((ch) => {
|
||||
const full = channels.find((x) => x.id === ch.id);
|
||||
const pct = Math.min(100, Math.round(((ch.used || 0) / Math.max(1, ch.daily_max || 9)) * 100));
|
||||
return (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user