import { useState } from "react"; import Read from "~components/biz/read"; import Toy from "~components/biz/toy"; import Say from "~components/biz/say"; import Message from "~components/ui/message"; import { clsn } from "~utils"; import "~assets/global.less"; import styles from "./sidepanel.module.less"; const initialType = new URLSearchParams(location.search).get("type") || "read"; const tabItems = [ { title: "在看", value: "read" }, { title: "手办", value: "toy" }, { title: "语录", value: "say" }, ]; function SidePanel() { const [type, setType] = useState(initialType); return (