From 0e0cf1a2aec0502716885a5dc413274ae6778d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=8E=E1=85=A1=E1=86=AB=E1=84=8C?= =?UTF-8?q?=E1=85=B5=E1=86=AB?= Date: Sun, 17 Jul 2022 20:33:45 +0900 Subject: [PATCH] =?UTF-8?q?:rocket:=20feat(boiler)=20:=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EB=84=A4=EC=9D=B4=EC=85=98=20=EC=98=88?= =?UTF-8?q?=EC=8B=9C=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MainLayout/MainLayout.js | 106 ++++++++++-------- .../Tables/ExamplePage/ExamplePage.js | 12 ++ src/components/Tables/ExamplePage/Table.js | 102 +++++++++++++++++ src/state/action-types/examplePagination.js | 4 + src/state/action-types/index.js | 7 +- src/state/action-types/keywordList.js | 3 - .../actions-creators/examplePagination.js | 39 +++++++ src/state/actions-creators/keywordList.js | 39 ------- src/state/reducers/examplePagination.js | 68 +++++++++++ src/state/reducers/index.js | 8 +- src/state/reducers/keywordList.js | 32 ------ src/state/reducers/userLookup.js | 71 ------------ 12 files changed, 292 insertions(+), 199 deletions(-) create mode 100644 src/components/Tables/ExamplePage/ExamplePage.js create mode 100644 src/components/Tables/ExamplePage/Table.js create mode 100644 src/state/action-types/examplePagination.js delete mode 100644 src/state/action-types/keywordList.js create mode 100644 src/state/actions-creators/examplePagination.js delete mode 100644 src/state/actions-creators/keywordList.js create mode 100644 src/state/reducers/examplePagination.js delete mode 100644 src/state/reducers/keywordList.js delete mode 100644 src/state/reducers/userLookup.js diff --git a/src/components/MainLayout/MainLayout.js b/src/components/MainLayout/MainLayout.js index 04ecbcc..c1a2042 100644 --- a/src/components/MainLayout/MainLayout.js +++ b/src/components/MainLayout/MainLayout.js @@ -1,36 +1,38 @@ -import { Layout, Menu, Breadcrumb } from "antd"; +import { Layout, Menu, Breadcrumb } from 'antd'; import { SortAscendingOutlined, GlobalOutlined, UserOutlined, IdcardOutlined, - CompassOutlined, -} from "@ant-design/icons"; -import React from "react"; -import { withNavigation } from "../../hoc/withRouterForClass"; -import { Route, Routes } from "react-router-dom"; -import "./MainLayout.css"; -import LandingPage from "../LandingPage/LandingPage"; -import UsersPage from "../Tables/UsersPage/UsersPage"; -import TicketsPage from "../Tables/TicketsPage/TicketsPage"; -import OrdersPage from "../Tables/OrdersPage/OrdersPage"; -import EnterPage from "../Tickets/EnterPage/EnterPage"; -import CheckPage from "../Tickets/CheckPage/CheckPage"; -import AccoutPage from "../AccountPage/AccoutPage"; + CompassOutlined +} from '@ant-design/icons'; +import React from 'react'; +import { withNavigation } from '../../hoc/withRouterForClass'; +import { Route, Routes } from 'react-router-dom'; +import './MainLayout.css'; +import LandingPage from '../LandingPage/LandingPage'; +import UsersPage from '../Tables/UsersPage/UsersPage'; +import TicketsPage from '../Tables/TicketsPage/TicketsPage'; +import OrdersPage from '../Tables/OrdersPage/OrdersPage'; +import EnterPage from '../Tickets/EnterPage/EnterPage'; +import CheckPage from '../Tickets/CheckPage/CheckPage'; +import AccoutPage from '../AccountPage/AccoutPage'; +import ExamplePage from '../Tables/ExamplePage/ExamplePage'; const { Content, Footer, Sider } = Layout; const keyToInfo = { - main1: { text: "랜딩 페이지", link: "/landing" }, - main2: { text: "유저 페이지", link: "/table/users" }, - main3: { text: "주문목록 페이지", link: "/table/orders" }, - main4: { text: "티켓 페이지", link: "/table/tickets" }, - main5: { text: "실시간 티켓 입장확인", link: "/tickets/enter" }, - main6: { text: "카메라 입장 확인", link: "/tickets/check" }, - main7: { text: "계정", link: "/accounts" }, + main1: { text: '랜딩 페이지', link: '/landing' }, + main2: { text: '유저 페이지', link: '/table/users' }, + main3: { text: '주문목록 페이지', link: '/table/orders' }, + main4: { text: '티켓 페이지', link: '/table/tickets' }, + main5: { text: '실시간 티켓 입장확인', link: '/tickets/enter' }, + main6: { text: '카메라 입장 확인', link: '/tickets/check' }, + main7: { text: '계정', link: '/accounts' }, + main8: { text: '예시페이지네이션', link: '/example' } }; -let clickedkeyPath = ["main1"]; +let clickedkeyPath = ['main1']; for (let key in keyToInfo) { if (keyToInfo[key].link === window.location.pathname) clickedkeyPath = [`${key}`]; @@ -39,10 +41,10 @@ for (let key in keyToInfo) { class MainLayout extends React.Component { state = { collapsed: false, - clickedkeyPath: clickedkeyPath, + clickedkeyPath: clickedkeyPath }; - onCollapse = (collapsed) => { + onCollapse = collapsed => { console.log(collapsed); this.setState({ collapsed }); }; @@ -56,18 +58,18 @@ class MainLayout extends React.Component { const { collapsed, clickedkeyPath } = this.state; console.log(window.location.pathname); return ( - +
zetciti
@@ -78,56 +80,63 @@ class MainLayout extends React.Component { style={{ // display: "flex", // flexDirection: "column", - background: "black", + background: 'black', - marginTop: "auto 0", - height: "%100", + marginTop: 'auto 0', + height: '%100' }} onClick={this.menuClick} > }> - {keyToInfo["main1"].text} + {keyToInfo['main1'].text} }> - {keyToInfo["main2"].text} + {keyToInfo['main2'].text} }> - {keyToInfo["main3"].text} + {keyToInfo['main3'].text} } - style={{ marginTop: "auto" }} + style={{ marginTop: 'auto' }} > - {keyToInfo["main4"].text} + {keyToInfo['main4'].text} } - style={{ marginTop: "auto" }} + style={{ marginTop: 'auto' }} > - {keyToInfo["main5"].text} + {keyToInfo['main5'].text} } - style={{ marginTop: "auto" }} + style={{ marginTop: 'auto' }} > - {keyToInfo["main6"].text} + {keyToInfo['main6'].text} } - style={{ marginTop: "auto" }} + style={{ marginTop: 'auto' }} > - {keyToInfo["main7"].text} + {keyToInfo['main7'].text} + + } + style={{ marginTop: 'auto' }} + > + {keyToInfo['main8'].text}
- - - {clickedkeyPath.map((e) => { + + + {clickedkeyPath.map(e => { return ( {keyToInfo[e].text} @@ -147,10 +156,11 @@ class MainLayout extends React.Component { } /> } /> } /> + } /> -