import { useEffect, useState } from "react";
import { useLocation, useNavigate } from "react-router-dom";
import { BrandMark, LivePulse } from "@/components/ui";
import { GlobalEventAlerts } from "@/components/GlobalEventAlerts";
import { fetchJson } from "@/lib/api";
import { DouyinLiveContextProvider, useDouyinLiveCount, useDouyinLiveProviderValue } from "@/lib/douyinLive";
import { YouTubeLiveContextProvider, useYouTubeLiveCount, useYouTubeLiveMap, useYouTubeLiveProviderValue } from "@/lib/youtubeLive";
import { Link } from "react-router-dom";
const NAV = [
{ href: "/", label: "概览", emoji: "📡" },
{ href: "/slots", label: "时段", emoji: "🕐" },
{ href: "/sessions", label: "场次", emoji: "🎬" },
{ href: "/anchors", label: "主播", emoji: "👤" },
{ href: "/covers", label: "截图", emoji: "🖼️" },
{ href: "/events", label: "事件", emoji: "⚡" },
{ href: "/rooms", label: "直播间", emoji: "🏠" },
{ href: "/groups", label: "分组", emoji: "📺" },
{ href: "/youtube", label: "YouTube", emoji: "▶️" },
{ href: "/shorts", label: "Shorts", emoji: "📱" },
{ href: "/blacklist", label: "黑名单", emoji: "🚫" },
{ href: "/settings", label: "设置", emoji: "⚙️" },
];
const MOBILE_PRIMARY = ["/", "/groups", "/shorts", "/youtube", "/settings"];
export function Shell({ children }: { children: React.ReactNode }) {
const ytCtx = useYouTubeLiveProviderValue();
const dyCtx = useDouyinLiveProviderValue();
return (
Live Radar
抖音 + YouTube · 开播捕捉 · 停播结场 · 时长统计 · 截图存证 · Windows 客户端
{(dyLiveCount > 0 || ytLiveCount > 0) ? (