Browse Source

:fire: HeadBar Footer

visuddhinanda 3 years ago
parent
commit
218a478c59

+ 15 - 6
dashboard/src/pages/library/community/list.tsx

@@ -1,31 +1,40 @@
+import { useState } from "react";
 import { Layout, Affix, Row, Col } from "antd";
+import { Typography } from "antd";
 
-import HeadBar from "../../../components/library/HeadBar";
-import FooterBar from "../../../components/library/FooterBar";
 import ChannelList from "../../../components/channel/ChannelList";
 import BookTree from "../../../components/corpus/BookTree";
 import ChapterFileter from "../../../components/corpus/ChapterFilter";
 import ChapterList from "../../../components/corpus/ChapterList";
-const { Sider, Content } = Layout;
+import ChapterTagList from "../../../components/corpus/ChapterTagList";
 
+const { Title } = Typography;
 const Widget = () => {
 	// TODO
+	const defaultTags: string[] = [];
+	const [tags, setTags] = useState(defaultTags);
+
 	return (
 		<Row>
 			<Col xs={0} xl={6}>
 				<Affix offsetTop={0}>
 					<Layout style={{ height: "100vh", overflowY: "scroll" }}>
 						<BookTree />
-						<ChannelList />
 					</Layout>
 				</Affix>
 			</Col>
 			<Col xs={24} xl={14}>
 				<ChapterFileter />
-				<ChapterList />
+				<Title level={1}>{tags}</Title>
+				<ChapterList tags={tags} />
 			</Col>
 			<Col xs={0} xl={4}>
-				侧边栏 侧边栏 侧边栏 侧边栏 侧边栏
+				<ChapterTagList
+					onTagClick={(key: string) => {
+						setTags([key]);
+					}}
+				/>
+				<ChannelList />
 			</Col>
 		</Row>
 	);

+ 1 - 6
dashboard/src/pages/studio/channel/edit.tsx

@@ -1,12 +1,7 @@
 import { useParams } from "react-router-dom";
 import { ProForm, ProFormText, ProFormSelect, ProFormTextArea } from "@ant-design/pro-components";
 import { useIntl } from "react-intl";
-import { message, Layout, Space } from "antd";
-import HeadBar from "../../../components/studio/HeadBar";
-import LeftSider from "../../../components/studio/LeftSider";
-import Footer from "../../../components/studio/Footer";
-
-const { Content } = Layout;
+import { message, Space } from "antd";
 
 interface IFormData {
 	name: string;