Add say form submit & popup entry
This commit is contained in:
+5
-2
@@ -1,6 +1,7 @@
|
||||
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";
|
||||
|
||||
@@ -10,7 +11,7 @@ import styles from "./sidepanel.module.less";
|
||||
const initialType = new URLSearchParams(location.search).get("type") || "read";
|
||||
|
||||
const tabItems = [
|
||||
{ title: "在读", value: "read" },
|
||||
{ title: "在看", value: "read" },
|
||||
{ title: "手办", value: "toy" },
|
||||
{ title: "语录", value: "say" },
|
||||
];
|
||||
@@ -22,7 +23,8 @@ function SidePanel() {
|
||||
<div className={styles.root}>
|
||||
<nav className={styles.nav}>
|
||||
{tabItems.map((item) => (
|
||||
<a className={clsn(type === item.value && styles.active)}
|
||||
<a key={item.value}
|
||||
className={clsn(type === item.value && styles.active)}
|
||||
onClick={() => setType(item.value)}
|
||||
>
|
||||
{item.title}
|
||||
@@ -31,6 +33,7 @@ function SidePanel() {
|
||||
</nav>
|
||||
{type === "read" && <Read />}
|
||||
{type === "toy" && <Toy />}
|
||||
{type === "say" && <Say />}
|
||||
<Message />
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user