Skip to content

Commit

Permalink
Chore : 불필요한 코드 삭제 #13
Browse files Browse the repository at this point in the history
  • Loading branch information
ancy0 committed May 19, 2024
1 parent d0aa510 commit 8de92af
Showing 1 changed file with 13 additions and 46 deletions.
59 changes: 13 additions & 46 deletions frontend/src/components/common/Nav.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import styled from "styled-components";
import { DesktopOutlined, FileOutlined, PieChartOutlined, TeamOutlined, UserOutlined } from "@ant-design/icons";
import { ConfigProvider, Layout, Menu } from "antd";
import { DesktopOutlined, TeamOutlined, UserOutlined } from "@ant-design/icons";
import { Layout, Menu } from "antd";
const { Sider } = Layout;
import { Outlet, Link, useLocation } from "react-router-dom";
function getItem(label, key, icon, children) {
Expand All @@ -14,11 +14,9 @@ function getItem(label, key, icon, children) {
}

const items = [
//getItem(<Link to="/">Option 1</Link>, "1", <PieChartOutlined />),
getItem(<Link to="/list">실종자 리스트</Link>, "2", <DesktopOutlined />),
getItem(<Link to="/report">실종자 리포트</Link>, "3", <UserOutlined />),
getItem(<Link to="/add">실종정보 등록</Link>, "4", <TeamOutlined />),
// getItem("Option 5", "5", <FileOutlined />),
];

const Nav = () => {
Expand All @@ -41,49 +39,18 @@ const Nav = () => {
};

return (
<ConfigProvider
theme={
{
// token: {
// colorSuccess: "#58f60a",
// colorWarning: "#ffb600",
// colorError: "#f93638",
// colorBgBase: "#1a1a20",
// fontSize: 15,
// colorLink: "#1677ff",
// colorPrimaryBgHover: "#1677ff",
// },
// algorithm: "dark",
// token: {
// colorBgBase: "#1a1a20",
// },
// // 1. Use dark algorithm
// // algorithm: theme.darkAlgorithm,
// // 2. Combine dark algorithm and compact algorithm
// algorithm: [theme.darkAlgorithm, theme.compactAlgorithm],
// components: {
// Layout: {
// siderBg: "#1a1a20", // add this
// },
// Menu: {
// darkItemBg: "#1a1a20", // add this
// },
// },
}
}>
<Layout
style={{
minHeight: "100vh",
}}>
<Sider collapsible collapsed={collapsed} onCollapse={(value) => setCollapsed(value)}>
<DemoLogo />
<Menu theme="dark" defaultSelectedKeys={["1"]} mode="inline" items={items} selectedKeys={currentKey()} />
</Sider>
<Layout>
<Outlet />
</Layout>
<Layout
style={{
minHeight: "100vh",
}}>
<Sider collapsible collapsed={collapsed} onCollapse={(value) => setCollapsed(value)}>
<DemoLogo />
<Menu theme="dark" defaultSelectedKeys={["1"]} mode="inline" items={items} selectedKeys={currentKey()} />
</Sider>
<Layout>
<Outlet />
</Layout>
</ConfigProvider>
</Layout>
);
};
export default Nav;
Expand Down

0 comments on commit 8de92af

Please sign in to comment.