Skip to content

Commit

Permalink
chore: remove Template tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisianthus-A committed Apr 19, 2024
1 parent ebe1779 commit 72266bc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/layout/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import { canvasRef } from "@/store";
import EventBus from "@/utils/event";
import { Icon } from "@/components";
import styles from "./Sidebar.module.scss";
import Template from "./Template";
// import Template from "./Template";
import Attr from "./Attr";
import Material from "./Material";
import Text from "./Text";
import My from "./My";
import Shape from "./Shape";

const tabs = [
{
id: "template",
iconType: "icon-template",
text: "模板",
},
// {
// id: "template",
// iconType: "icon-template",
// text: "模板",
// },
{
id: "material",
iconType: "icon-material",
Expand Down Expand Up @@ -45,7 +45,7 @@ const tabs = [
];

function Sidebar() {
const [currentTab, setCurrentTab] = useState("template");
const [currentTab, setCurrentTab] = useState(tabs[0].id);

const handleTabClick = (tabItem: (typeof tabs)[number]) => {
setCurrentTab(tabItem.id);
Expand Down Expand Up @@ -89,7 +89,7 @@ function Sidebar() {
))}
</div>
<div className={styles.main}>
{currentTab === "template" && <Template />}
{/* {currentTab === "template" && <Template />} */}
{currentTab === "material" && <Material />}
{currentTab === "text" && <Text />}
{currentTab === "shape" && <Shape />}
Expand Down

0 comments on commit 72266bc

Please sign in to comment.