新建信件按钮
This commit is contained in:
parent
78514cb093
commit
7170501f59
|
|
@ -1,10 +1,14 @@
|
||||||
|
import { Button } from "antd";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
export function Header() {
|
export function Header() {
|
||||||
|
const navigate = useNavigate();
|
||||||
return (
|
return (
|
||||||
<header className="bg-gradient-to-r from-primary-500/80 to-primary-400 p-6 rounded-t-xl">
|
<header className="bg-gradient-to-r from-primary-500/80 to-primary-400 p-6 rounded-t-xl">
|
||||||
<div className="flex flex-col space-y-6">
|
<div className="flex flex-col space-y-6">
|
||||||
{/* 主标题区域 */}
|
{/* 主标题区域 */}
|
||||||
<div>
|
<div className="flex items-center justify-between ">
|
||||||
<h1 className="text-3xl font-bold tracking-wider text-white">
|
<h1 className="text-3xl font-bold tracking-wider text-white m-0">
|
||||||
我的悄悄话
|
我的悄悄话
|
||||||
</h1>
|
</h1>
|
||||||
{/* <p className="mt-2 text-blue-100 text-lg">
|
{/* <p className="mt-2 text-blue-100 text-lg">
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
import { useState, useEffect, useMemo } from "react";
|
import { useState, useEffect, useMemo } from "react";
|
||||||
import { Input, Pagination, Empty, Spin, Radio, Space, Tag } from "antd";
|
import { Input, Pagination, Empty, Spin, Radio, Space, Tag, Button } from "antd";
|
||||||
import { api, RouterInputs } from "@nice/client";
|
import { api, RouterInputs } from "@nice/client";
|
||||||
import { LetterCard } from "../LetterCard";
|
import { LetterCard } from "../LetterCard";
|
||||||
import { NonVoid } from "@nice/utils";
|
import { NonVoid } from "@nice/utils";
|
||||||
import { SearchOutlined, FilterOutlined } from "@ant-design/icons";
|
import { SearchOutlined, FilterOutlined } from "@ant-design/icons";
|
||||||
import debounce from "lodash/debounce";
|
import debounce from "lodash/debounce";
|
||||||
import { postDetailSelect } from "@nice/common";
|
import { postDetailSelect } from "@nice/common";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
export default function LetterList({
|
export default function LetterList({
|
||||||
params,
|
params,
|
||||||
|
|
@ -17,7 +18,7 @@ export default function LetterList({
|
||||||
const [keyword, setKeyword] = useState<string | undefined>("");
|
const [keyword, setKeyword] = useState<string | undefined>("");
|
||||||
const [currentPage, setCurrentPage] = useState(1);
|
const [currentPage, setCurrentPage] = useState(1);
|
||||||
const [selectedCategory, setSelectedCategory] = useState<string>("all");
|
const [selectedCategory, setSelectedCategory] = useState<string>("all");
|
||||||
|
const navigate = useNavigate();
|
||||||
const { data: categoriesData } = api.term.findMany.useQuery({
|
const { data: categoriesData } = api.term.findMany.useQuery({
|
||||||
where: {
|
where: {
|
||||||
taxonomy: {
|
taxonomy: {
|
||||||
|
|
@ -124,6 +125,13 @@ export default function LetterList({
|
||||||
</Radio.Button>
|
</Radio.Button>
|
||||||
))}
|
))}
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
size="large"
|
||||||
|
onClick={() => navigate("/editor")}
|
||||||
|
className="flex items-center justify-center">
|
||||||
|
添加信件
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Space direction="vertical" className="w-full" size="middle">
|
<Space direction="vertical" className="w-full" size="middle">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue