907e87eb5909f828cfe8284a1af75ed0.json
63.5 KB
{"ast":null,"code":"import { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nvar _jsxFileName = \"C:\\\\Users\\\\kkwan_000\\\\Desktop\\\\git\\\\2017110269\\\\minsung\\\\src\\\\Container\\\\Home.js\",\n _s = $RefreshSig$();\n\nimport React, { useState, useEffect, useCallback } from 'react';\nimport 'antd/dist/antd.css';\nimport './Tikz.css';\nimport './Home.css';\nimport { withRouter } from 'react-router-dom';\nimport { Layout, Menu, Table, Button, Card, Modal, message } from 'antd';\nimport { MenuOutlined, FunctionOutlined, FontSizeOutlined, LineChartOutlined, EyeOutlined, DownloadOutlined, UploadOutlined, DeleteOutlined, UserOutlined, ReadOutlined } from '@ant-design/icons';\nimport mathbank from '../lib/mathbank.png';\nimport heartgraph from '../lib/heartgraph.png';\nimport Html from './Html.js';\nimport Mathcha from './Mathcha.js';\nimport Tikz from './Tikz.js';\nimport { Redirect } from 'react-router-dom';\nimport { getData } from 'lib/api/html';\nimport { getMathData } from '../lib/api/mathCha';\nimport { removeItem, removeItems } from '../lib/api/tikz';\nconst {\n Header,\n Sider,\n Content\n} = Layout;\nconst {\n SubMenu\n} = Menu;\nconst host = 'http://localhost:5000';\n/* 테이블에 들어가는 컨텐츠 메크로로 생성 */\n\nconst fetchGetData = async (user, pageSize, currentPage, orderWhat, orderKind) => {\n try {\n console.log(pageSize);\n const result = await getData(user, pageSize, currentPage, orderWhat, orderKind);\n\n if (result.status === 200) {\n return result.data;\n } else {\n return null;\n }\n } catch (e) {\n console.log(e);\n return null;\n }\n}; //로그아웃 기능 -> session storage 제거 및 Login으로 이동하게 해야함\n\n\nconst Home = ({\n history\n}) => {\n _s();\n\n const [html, setHtml] = useState(false);\n const [mathcha, setMathcha] = useState(false);\n const [tikz, setTikz] = useState(false);\n const [visible, setVisible] = useState(false);\n const [selectedRowKeys, setSelectedRowKeys] = useState(false);\n const [collapsed, setCollapsed] = useState(false);\n const [status, setStatus] = useState(null);\n const [data, setData] = useState([]);\n const [selectItem, setSelectItem] = useState(null);\n const [selectItems, setSelectItems] = useState([]);\n const [removeVisible, setRemoveVisible] = useState(false);\n const [mode, setMode] = useState(null);\n const [tikzmode, setTikzMode] = useState(null);\n const [total, setTotal] = useState(0);\n const [currentPage, setCurrentPage] = useState(1);\n const [pageSize, setPageSize] = useState(10);\n const [orderWhat, setOrderWhat] = useState('qno');\n const [orderWhatKor, setOrderWhatKor] = useState('문제번호순');\n const [orderKind, setOrderKind] = useState('desc');\n const [orderKindKor, setOrderKindKor] = useState('내림차순');\n const [orderWhatStatus, setOrderWhatStatus] = useState(false);\n const [orderKindStatus, setOrderKindStatus] = useState(false);\n\n const callback = param => {\n const {\n status\n } = param;\n\n if (status) {\n setStatus(status);\n }\n };\n\n const onOrderWhat = async () => {\n if (orderWhatKor === \"문제번호순\") {\n setOrderWhat('id');\n setOrderWhatKor(\"최근등록순\");\n setOrderWhatStatus(true);\n } else {\n setOrderWhat('qno');\n setOrderWhatKor(\"문제번호순\");\n setOrderWhatStatus(true);\n }\n };\n\n const onOrderKind = () => {\n if (orderKindKor === \"내림차순\") {\n setOrderKind('asc');\n setOrderKindKor(\"오름차순\");\n setOrderKindStatus(true);\n } else {\n setOrderKind('desc');\n setOrderKindKor(\"내림차순\");\n setOrderKindStatus(true);\n }\n };\n\n const callbackFetch = useCallback(async () => {\n const user = sessionStorage.getItem('id');\n const result = await fetchGetData(user, pageSize, currentPage, orderWhat, orderKind);\n console.log(pageSize);\n\n if (result) {\n console.log(result.tikzs);\n setData(result.tikzs.map(x => Object.assign({}, x, {\n key: x.id\n })));\n setTotal(result.total);\n setStatus(null);\n setOrderKindStatus(false);\n setOrderWhatStatus(false);\n }\n }, [fetchGetData, pageSize, currentPage, orderWhat, orderKind]);\n useEffect(() => {\n if (status == null || status != null && status === 'SAVE_OK') {\n callbackFetch();\n }\n\n if (orderKindStatus === true || orderWhatStatus === true) {\n callbackFetch();\n }\n }, [status, orderKindStatus, orderWhatStatus]);\n /*파일 정렬 */\n\n useEffect(() => {}, [orderWhat, orderWhatKor, orderKind, orderKindKor, Table]);\n /* 모달 */\n\n const showModal = (e, value) => {\n console.log(value);\n setSelectItem(value);\n setVisible(!visible);\n };\n\n const handleOk = e => {\n console.log(e);\n setVisible(!visible);\n };\n\n const handleCancel = e => {\n console.log(e);\n setVisible(!visible);\n };\n /* 로그인 모달 */\n\n\n const showLogin = e => {\n console.log(e);\n setVisible(!visible);\n };\n\n const showTikz = (e, value) => {\n setTikzMode(\"preview\");\n setSelectItem(value);\n setTikz(true);\n };\n\n const columns = [{\n title: '문제 번호',\n dataIndex: 'qno'\n }, {\n title: '문제 타입',\n dataIndex: 'typeSol'\n }, {\n title: '문제/풀이 구분',\n dataIndex: 'typeQue'\n }, {\n title: 'HTML',\n dataIndex: 'htmlFileName',\n render: (value, row) => {\n if (value) {\n return /*#__PURE__*/_jsxDEV(Button, {\n type: \"dashed\",\n shape: \"round\",\n icon: /*#__PURE__*/_jsxDEV(LineChartOutlined, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 203,\n columnNumber: 21\n }, this),\n onClick: e => showModal(e, row)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 200,\n columnNumber: 13\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"span\", {\n children: \"-\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 208,\n columnNumber: 18\n }, this);\n }\n }\n }, {\n title: 'Mathcha',\n dataIndex: 'mathcharFileName',\n render: (value, row) => {\n if (value) {\n return /*#__PURE__*/_jsxDEV(\"a\", {\n href: `${host}/mathchaDownload/${value}`,\n children: /*#__PURE__*/_jsxDEV(DownloadOutlined, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 219,\n columnNumber: 15\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 218,\n columnNumber: 13\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"span\", {\n children: \"-\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 224,\n columnNumber: 18\n }, this);\n }\n }\n }, {\n title: 'TikZ',\n dataIndex: 'tex',\n render: (value, row) => {\n if (value) {\n return /*#__PURE__*/_jsxDEV(Button, {\n type: \"dashed\",\n shape: \"round\",\n icon: /*#__PURE__*/_jsxDEV(LineChartOutlined, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 237,\n columnNumber: 21\n }, this),\n onClick: e => showTikz(e, row)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 234,\n columnNumber: 13\n }, this);\n } else {\n return /*#__PURE__*/_jsxDEV(\"span\", {\n children: \"-\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 242,\n columnNumber: 18\n }, this);\n }\n }\n }, {\n title: '삭제',\n dataIndex: 'delete',\n render: (value, row) => {\n return /*#__PURE__*/_jsxDEV(Button, {\n type: \"text\",\n icon: /*#__PURE__*/_jsxDEV(DeleteOutlined, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 250,\n columnNumber: 42\n }, this),\n danger: true,\n onClick: e => removeShowModal(e, row)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 250,\n columnNumber: 16\n }, this);\n }\n }, {\n title: '작성자',\n dataIndex: 'creator'\n }];\n\n const removeShowModal = (e, row) => {\n setSelectItem(row);\n setMode('single');\n setRemoveVisible(true);\n };\n\n const removeItemsShowModal = () => {\n setMode('multi');\n setRemoveVisible(true);\n };\n\n const removeHandleCancel = () => {\n setRemoveVisible(false);\n };\n\n const removeHandleOk = async () => {\n if (mode === 'single') {\n try {\n const result = await removeItem(selectItem.id);\n\n if (result.status == 200) {\n message.info(\"삭제되었습니다.\");\n callbackFetch();\n setRemoveVisible(false);\n }\n } catch (e) {\n console.log(e);\n message.warn(e);\n }\n }\n\n if (mode === 'multi') {\n try {\n const result = await removeItems(selectItems);\n\n if (result.status == 200) {\n message.info(\"삭제되었습니다.\");\n callbackFetch();\n setRemoveVisible(false);\n }\n } catch (e) {\n console.log(e);\n message.warn(e);\n }\n }\n };\n\n const onSelectChange = selectedRowKeys => {\n console.log('selectedRowKeys Changed: ', selectedRowKeys);\n setSelectItems(selectedRowKeys);\n };\n\n const onCancelHtml = () => {\n setHtml(false);\n };\n\n const onCancelMathCha = () => {\n setMathcha(false);\n };\n\n const onExit = () => {\n setMathcha(false);\n };\n\n const onLeave = () => {\n setSelectItem(null);\n setTikz(false);\n };\n\n const onHtml = () => {\n setHtml(true);\n };\n\n const onMathcha = () => {\n setMathcha(true);\n };\n\n const onTikz = () => {\n setTikzMode(\"new\");\n setTikz(true);\n };\n\n const toggle = () => {\n setCollapsed(!collapsed);\n };\n\n const onCollapse = (collapsed, type) => {\n //this.setState({ collapsed });\n setCollapsed(!collapsed);\n };\n\n const rowSelection = {\n selectedRowKeys: selectItems,\n onChange: onSelectChange\n };\n const hasSelected = selectedRowKeys.length > 0;\n const isAuth = sessionStorage.getItem('isAuth');\n const userId = sessionStorage.getItem('id');\n if (!isAuth) return /*#__PURE__*/_jsxDEV(Redirect, {\n to: \"/\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 358,\n columnNumber: 23\n }, this);\n return /*#__PURE__*/_jsxDEV(Layout, {\n children: [/*#__PURE__*/_jsxDEV(Sider, {\n trigger: null,\n collapsible: true,\n collapsed: !collapsed,\n onCollapse: onCollapse,\n style: {\n height: '100vh'\n },\n children: [/*#__PURE__*/_jsxDEV(\"img\", {\n className: \"mathbank\",\n src: mathbank,\n alt: \"mathbank\",\n onClick: () => window.location.reload(),\n style: {\n width: 'auto',\n height: '54px',\n marginLeft: '22px',\n marginTop: '10px',\n cursor: 'pointer'\n }\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 369,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(Menu, {\n theme: \"dark\",\n defaultSelectedKeys: ['1'],\n mode: \"inline\",\n style: {\n fontSize: '18px'\n },\n children: [/*#__PURE__*/_jsxDEV(SubMenu, {\n icon: /*#__PURE__*/_jsxDEV(UserOutlined, {\n style: {\n fontSize: '18px'\n }\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 390,\n columnNumber: 19\n }, this),\n title: \"User's Info\",\n style: {\n backgroundColor: 'rgb(0, 21, 41)'\n },\n children: /*#__PURE__*/_jsxDEV(Menu.Item, {\n onClick: \"none\",\n style: {\n width: '200px',\n height: '100%',\n paddingLeft: '0px',\n background: 'rgb(0, 21, 41)',\n textAlign: 'center'\n },\n children: [userId, \"\\uB2D8 \\uD658\\uC601\\uD569\\uB2C8\\uB2E4.\"]\n }, \"1\", true, {\n fileName: _jsxFileName,\n lineNumber: 393,\n columnNumber: 13\n }, this)\n }, \"sub1\", false, {\n fileName: _jsxFileName,\n lineNumber: 388,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(SubMenu, {\n icon: /*#__PURE__*/_jsxDEV(ReadOutlined, {\n style: {\n fontsize: '15px'\n }\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 408,\n columnNumber: 19\n }, this),\n title: \"MathCha\",\n style: {\n backgroundColor: 'rgb(0, 21, 41)'\n },\n children: [/*#__PURE__*/_jsxDEV(Menu.Item, {\n style: {\n width: '200px',\n height: '100%',\n paddingLeft: '0px',\n background: 'rgb(0, 21, 41)',\n textAlign: 'center'\n },\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"http://mathcha.io\",\n target: \"_blank\",\n children: \"MathCha \\uB2E4\\uC6B4\\uB85C\\uB4DC\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 421,\n columnNumber: 20\n }, this)\n }, \"1\", false, {\n fileName: _jsxFileName,\n lineNumber: 413,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Menu.Item, {\n style: {\n width: '200px',\n height: '100%',\n paddingLeft: '0px',\n background: 'rgb(0, 21, 41)',\n textAlign: 'center'\n },\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"https://m.blog.naver.com/PostView.nhn?blogId=wool613&logNo=221511340406&proxyReferer=https:%2F%2Fwww.google.com%2F\",\n target: \"_blank\",\n children: \"tikz \\uAC04\\uB2E8 \\uC124\\uBA85\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 431,\n columnNumber: 20\n }, this)\n }, \"2\", false, {\n fileName: _jsxFileName,\n lineNumber: 423,\n columnNumber: 14\n }, this), /*#__PURE__*/_jsxDEV(Menu.Item, {\n style: {\n width: '200px',\n height: '100%',\n paddingLeft: '0px',\n background: 'rgb(0, 21, 41)',\n textAlign: 'center'\n },\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"https://www.bu.edu/math/files/2013/08/tikzpgfmanual.pdf\",\n target: \"_blank\",\n children: \"tikz \\uC0C1\\uC138 \\uBA54\\uB274\\uC5BC\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 441,\n columnNumber: 20\n }, this)\n }, \"3\", false, {\n fileName: _jsxFileName,\n lineNumber: 433,\n columnNumber: 14\n }, this)]\n }, \"sub2\", true, {\n fileName: _jsxFileName,\n lineNumber: 406,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 382,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 363,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(Layout, {\n className: \"site-layout\",\n children: [/*#__PURE__*/_jsxDEV(Header, {\n className: \"site-layout-background\",\n style: {\n padding: 0\n },\n children: [/*#__PURE__*/_jsxDEV(MenuOutlined, {\n style: {\n marginLeft: '13px'\n },\n onClick: (collapsed, toggle)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 448,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(Button, {\n className: \"logout\",\n type: \"default\",\n onClick: e => {\n sessionStorage.removeItem('id');\n sessionStorage.removeItem('isAuth');\n history.push('/');\n },\n children: \"\\uB85C\\uADF8\\uC544\\uC6C3\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 452,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 447,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(Content, {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n style: {\n marginBottom: 16\n },\n children: /*#__PURE__*/_jsxDEV(\"span\", {\n style: {\n marginLeft: 8\n },\n children: hasSelected ? `Selected ${selectedRowKeys.length} items` : ''\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 464,\n columnNumber: 15\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 463,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Button, {\n style: {\n display: 'inline-block',\n top: '0.5vh',\n left: '8vw'\n },\n type: \"primary\",\n shape: \"round\",\n icon: /*#__PURE__*/_jsxDEV(UploadOutlined, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 472,\n columnNumber: 21\n }, this),\n onClick: onHtml,\n children: \"HTML \\uC5C5\\uB85C\\uB4DC\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 468,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Button, {\n style: {\n display: 'inline-block',\n top: '0.5vh',\n left: '8.5vw'\n },\n type: \"primary\",\n shape: \"round\",\n icon: /*#__PURE__*/_jsxDEV(UploadOutlined, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 480,\n columnNumber: 21\n }, this),\n onClick: onMathcha,\n children: \"Mathcha \\uC5C5\\uB85C\\uB4DC\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 476,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Button, {\n style: {\n display: 'inline-block',\n top: '0.5vh',\n left: '9vw'\n },\n type: \"primary\",\n shape: \"round\",\n icon: /*#__PURE__*/_jsxDEV(UploadOutlined, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 488,\n columnNumber: 21\n }, this),\n onClick: onTikz,\n children: \"TikZ \\uC5C5\\uB85C\\uB4DC\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 484,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Button, {\n style: {\n display: 'inline-block',\n top: '0.5vh',\n left: '9.5vw'\n },\n type: \"dashed\",\n shape: \"round\",\n icon: /*#__PURE__*/_jsxDEV(DeleteOutlined, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 500,\n columnNumber: 21\n }, this),\n onClick: e => {\n console.log(selectItems);\n\n if (selectItems.length > 0) {\n removeItemsShowModal();\n } else {\n message.info(\"삭제할 데이터를 선택해 주세요.\");\n }\n },\n danger: true,\n children: \"\\uC120\\uD0DD \\uC0AD\\uC81C\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 492,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Button, {\n style: {\n display: 'inline-block',\n top: '0.5vh',\n left: '50vw'\n },\n className: \"orderWhat\",\n type: \"default\",\n onClick: onOrderWhat,\n children: orderWhatKor\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 514,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Button, {\n style: {\n display: 'inline-block',\n top: '0.5vh',\n left: '50.2vw'\n },\n className: \"orderKind\",\n type: \"default\",\n onClick: onOrderKind,\n children: orderKindKor\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 522,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Table, {\n rowSelection: rowSelection,\n pagination: {\n total: total,\n current: currentPage,\n pageSize: pageSize,\n orderWhat: orderWhat,\n orderKind: orderKind,\n onChange: async (page, pageSize) => {\n console.log(page, pageSize);\n setCurrentPage(page);\n const user = sessionStorage.getItem('id');\n const result = await fetchGetData(user, pageSize, page, orderWhat, orderKind);\n console.log(pageSize);\n\n if (result) {\n console.log(result.tikzs);\n setData(result.tikzs.map(x => Object.assign({}, x, {\n key: x.id\n })));\n setTotal(result.total);\n setStatus(null);\n }\n }\n },\n columns: columns,\n dataSource: data,\n style: {\n width: '80vw',\n marginTop: '1.5vh',\n marginLeft: '8vw'\n }\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 530,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Modal, {\n title: \"\\uBBF8\\uB9AC\\uBCF4\\uAE30\",\n visible: visible,\n centered: true,\n width: \"400px\",\n height: \"400px\",\n onOk: handleOk,\n onCancel: handleCancel,\n children: selectItem && /*#__PURE__*/_jsxDEV(\"iframe\", {\n scrolling: \"no\",\n frameBorder: \"0\",\n style: {\n overflow: 'hidden',\n overflowX: 'hidden',\n overflowY: 'hidden',\n position: 'relative',\n top: '0px',\n left: '0px',\n right: '0px',\n bottom: '0px',\n height: '300px',\n width: '350px'\n },\n className: \"iframe\",\n src: `${host}/htmlPreview/${selectItem.htmlFileName}`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 567,\n columnNumber: 32\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 558,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Modal, {\n title: \"\\uB2E4\\uC6B4\\uB85C\\uB4DC\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 570,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Modal, {\n title: \"\\uC0AD\\uC81C\\uD558\\uC2DC\\uACA0\\uC2B5\\uB2C8\\uAE4C?\",\n visible: removeVisible,\n onOk: removeHandleOk,\n onCancel: removeHandleCancel,\n okText: \"\\uD655\\uC778\",\n cancelText: \"\\uCDE8\\uC18C\",\n children: /*#__PURE__*/_jsxDEV(\"p\", {\n children: \"\\uD655\\uC778\\uC744 \\uD074\\uB9AD\\uD558\\uC2DC\\uBA74 \\uC0AD\\uC81C\\uB429\\uB2C8\\uB2E4!\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 581,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 573,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Html, {\n visible: html,\n onCancel: onCancelHtml,\n callback: callback\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 583,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Mathcha, {\n visible: mathcha,\n onCancel: onCancelMathCha,\n callback: callback\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 584,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(Tikz, {\n visible: tikz,\n onLeave: onLeave,\n callback: callback,\n selectItem: selectItem,\n mode: tikzmode\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 585,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 462,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 461,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 446,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 362,\n columnNumber: 5\n }, this);\n};\n\n_s(Home, \"Lo+CVs2d6naWGGg5ibb/HLARaNQ=\");\n\n_c = Home;\nexport default _c2 = withRouter(Home);\n\nvar _c, _c2;\n\n$RefreshReg$(_c, \"Home\");\n$RefreshReg$(_c2, \"%default%\");","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/src/Container/Home.js"],"names":["React","useState","useEffect","useCallback","withRouter","Layout","Menu","Table","Button","Card","Modal","message","MenuOutlined","FunctionOutlined","FontSizeOutlined","LineChartOutlined","EyeOutlined","DownloadOutlined","UploadOutlined","DeleteOutlined","UserOutlined","ReadOutlined","mathbank","heartgraph","Html","Mathcha","Tikz","Redirect","getData","getMathData","removeItem","removeItems","Header","Sider","Content","SubMenu","host","fetchGetData","user","pageSize","currentPage","orderWhat","orderKind","console","log","result","status","data","e","Home","history","html","setHtml","mathcha","setMathcha","tikz","setTikz","visible","setVisible","selectedRowKeys","setSelectedRowKeys","collapsed","setCollapsed","setStatus","setData","selectItem","setSelectItem","selectItems","setSelectItems","removeVisible","setRemoveVisible","mode","setMode","tikzmode","setTikzMode","total","setTotal","setCurrentPage","setPageSize","setOrderWhat","orderWhatKor","setOrderWhatKor","setOrderKind","orderKindKor","setOrderKindKor","orderWhatStatus","setOrderWhatStatus","orderKindStatus","setOrderKindStatus","callback","param","onOrderWhat","onOrderKind","callbackFetch","sessionStorage","getItem","tikzs","map","x","Object","assign","key","id","showModal","value","handleOk","handleCancel","showLogin","showTikz","columns","title","dataIndex","render","row","removeShowModal","removeItemsShowModal","removeHandleCancel","removeHandleOk","info","warn","onSelectChange","onCancelHtml","onCancelMathCha","onExit","onLeave","onHtml","onMathcha","onTikz","toggle","onCollapse","type","rowSelection","onChange","hasSelected","length","isAuth","userId","height","window","location","reload","width","marginLeft","marginTop","cursor","fontSize","backgroundColor","paddingLeft","background","textAlign","fontsize","padding","push","marginBottom","display","top","left","current","page","overflow","overflowX","overflowY","position","right","bottom","htmlFileName"],"mappings":";;;;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,EAAqCC,WAArC,QAAwD,OAAxD;AACA,OAAO,oBAAP;AACA,OAAO,YAAP;AACA,OAAO,YAAP;AACA,SAAQC,UAAR,QAAyB,kBAAzB;AACA,SAASC,MAAT,EAAiBC,IAAjB,EAAuBC,KAAvB,EAA8BC,MAA9B,EAAsCC,IAAtC,EAA4CC,KAA5C,EAAkDC,OAAlD,QAAiE,MAAjE;AACA,SACEC,YADF,EAEEC,gBAFF,EAGEC,gBAHF,EAIEC,iBAJF,EAKEC,WALF,EAMEC,gBANF,EAOEC,cAPF,EAQEC,cARF,EASEC,YATF,EAUEC,YAVF,QAWO,mBAXP;AAYA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAA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eA2HE,QAAC,IAAD;AAAM,YAAA,OAAO,EAAElC,IAAf;AAAqB,YAAA,OAAO,EAAEqE,OAA9B;AAAuC,YAAA,QAAQ,EAAEnC,QAAjD;AAA2D,YAAA,UAAU,EAAExB,UAAvE;AAAmF,YAAA,IAAI,EAAEQ;AAAzF;AAAA;AAAA;AAAA;AAAA,kBA3HF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cAfF;AAAA;AAAA;AAAA;AAAA;AAAA,YApFF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAsOD,CAthBD;;GAAMxB,I;;KAAAA,I;AAwhBN,qBAAe7C,UAAU,CAAC6C,IAAD,CAAzB","sourcesContent":["import React, { useState, useEffect, useCallback } from 'react';\r\nimport 'antd/dist/antd.css';\r\nimport './Tikz.css';\r\nimport './Home.css';\r\nimport {withRouter} from 'react-router-dom';\r\nimport { Layout, Menu, Table, Button, Card, Modal,message } from 'antd';\r\nimport {\r\n MenuOutlined,\r\n FunctionOutlined,\r\n FontSizeOutlined,\r\n LineChartOutlined,\r\n EyeOutlined,\r\n DownloadOutlined,\r\n UploadOutlined,\r\n DeleteOutlined,\r\n UserOutlined,\r\n ReadOutlined\r\n} from '@ant-design/icons';\r\nimport mathbank from '../lib/mathbank.png';\r\nimport heartgraph from '../lib/heartgraph.png';\r\nimport Html from './Html.js';\r\nimport Mathcha from './Mathcha.js';\r\nimport Tikz from './Tikz.js';\r\nimport { Redirect } from 'react-router-dom';\r\nimport {getData} from 'lib/api/html';\r\nimport { getMathData } from '../lib/api/mathCha';\r\nimport { removeItem,removeItems } from '../lib/api/tikz';\r\n\r\nconst { Header, Sider, Content } = Layout;\r\nconst { SubMenu } = Menu;\r\n\r\nconst host= 'http://localhost:5000';\r\n\r\n/* 테이블에 들어가는 컨텐츠 메크로로 생성 */\r\n\r\nconst fetchGetData = async(user, pageSize, currentPage, orderWhat,orderKind) => {\r\n try{\r\n console.log(pageSize);\r\n const result = await getData(user, pageSize, currentPage,orderWhat,orderKind);\r\n if(result.status === 200){\r\n return result.data;\r\n }else {\r\n return null;\r\n }\r\n }catch(e){\r\n console.log(e);\r\n return null;\r\n }\r\n};\r\n\r\n\r\n\r\n//로그아웃 기능 -> session storage 제거 및 Login으로 이동하게 해야함\r\n\r\n\r\n\r\nconst Home = ({history}) => {\r\n const [html, setHtml] = useState(false);\r\n\r\n const [mathcha, setMathcha] = useState(false);\r\n\r\n const [tikz, setTikz] = useState(false);\r\n\r\n const [visible, setVisible] = useState(false);\r\n\r\n const [selectedRowKeys, setSelectedRowKeys] = useState(false);\r\n\r\n const [collapsed, setCollapsed] = useState(false);\r\n\r\n const [status,setStatus] = useState(null);\r\n\r\n const [data, setData] = useState([]);\r\n\r\n const [selectItem, setSelectItem] = useState(null);\r\n\r\n const [selectItems, setSelectItems] = useState([]);\r\n\r\n const [removeVisible,setRemoveVisible] = useState(false);\r\n\r\n const [mode ,setMode] =useState(null);\r\n\r\n const [tikzmode,setTikzMode] =useState(null);\r\n\r\n const [total, setTotal] =useState(0);\r\n const [currentPage, setCurrentPage] =useState(1);\r\n const [pageSize,setPageSize] =useState(10);\r\n const [orderWhat,setOrderWhat] = useState('qno');\r\n const [orderWhatKor,setOrderWhatKor] =useState('문제번호순');\r\n const [orderKind,setOrderKind] = useState('desc');\r\n const [orderKindKor,setOrderKindKor] = useState('내림차순');\r\n const [orderWhatStatus,setOrderWhatStatus] =useState(false);\r\n const [orderKindStatus,setOrderKindStatus] =useState(false);\r\n const callback = (param) => {\r\n const {status} = param;\r\n if(status){\r\n setStatus(status);\r\n }\r\n }\r\n const onOrderWhat = async() => {\r\n if(orderWhatKor ===\"문제번호순\"){\r\n setOrderWhat('id');\r\n setOrderWhatKor(\"최근등록순\"); \r\n setOrderWhatStatus(true);\r\n }else{\r\n setOrderWhat('qno');\r\n setOrderWhatKor(\"문제번호순\");\r\n setOrderWhatStatus(true);\r\n }\r\n };\r\n const onOrderKind = () => {\r\n if(orderKindKor ===\"내림차순\"){\r\n setOrderKind('asc');\r\n setOrderKindKor(\"오름차순\");\r\n setOrderKindStatus(true);\r\n }else{\r\n setOrderKind('desc')\r\n setOrderKindKor(\"내림차순\");\r\n setOrderKindStatus(true);\r\n }\r\n };\r\n\r\n const callbackFetch = useCallback(async () => {\r\n const user = sessionStorage.getItem('id');\r\n const result = await fetchGetData(user,pageSize,currentPage,orderWhat, orderKind);\r\n console.log(pageSize);\r\n if(result){\r\n console.log(result.tikzs);\r\n setData(result.tikzs.map(x=>Object.assign({},x,{key: x.id})));\r\n setTotal(result.total);\r\n setStatus(null);\r\n setOrderKindStatus(false);\r\n setOrderWhatStatus(false);\r\n }\r\n },[fetchGetData,pageSize,currentPage,orderWhat,orderKind]);\r\n\r\n useEffect(() =>{\r\n if(status==null || (status!=null && status==='SAVE_OK')){\r\n callbackFetch();\r\n }\r\n if(orderKindStatus === true || orderWhatStatus ===true){\r\n callbackFetch();\r\n }\r\n },[status,orderKindStatus,orderWhatStatus])\r\n \r\n \r\n /*파일 정렬 */\r\n useEffect(()=>{\r\n \r\n },[orderWhat,orderWhatKor,orderKind,orderKindKor, Table])\r\n \r\n /* 모달 */\r\n const showModal = (e, value) => {\r\n console.log(value);\r\n setSelectItem(value);\r\n setVisible(!visible);\r\n };\r\n\r\n const handleOk = (e) => {\r\n console.log(e);\r\n setVisible(!visible);\r\n };\r\n\r\n const handleCancel = (e) => {\r\n console.log(e);\r\n setVisible(!visible);\r\n };\r\n\r\n /* 로그인 모달 */\r\n const showLogin = (e) => {\r\n console.log(e);\r\n setVisible(!visible);\r\n };\r\n\r\n const showTikz= (e, value) => {\r\n setTikzMode(\"preview\");\r\n setSelectItem(value);\r\n setTikz(true);\r\n };\r\n\r\n const columns = [\r\n\r\n {\r\n title: '문제 번호',\r\n dataIndex: 'qno',\r\n },\r\n {\r\n title: '문제 타입',\r\n dataIndex: 'typeSol',\r\n },\r\n {\r\n title: '문제/풀이 구분',\r\n dataIndex: 'typeQue',\r\n },\r\n {\r\n title: 'HTML',\r\n dataIndex: 'htmlFileName',\r\n render: (value, row) => {\r\n if(value){\r\n return (\r\n <Button\r\n type=\"dashed\"\r\n shape=\"round\"\r\n icon={<LineChartOutlined />}\r\n onClick={(e)=>showModal(e, row)}\r\n />\r\n );\r\n }else{\r\n return <span>-</span>\r\n }\r\n },\r\n },\r\n {\r\n title: 'Mathcha',\r\n dataIndex: 'mathcharFileName',\r\n render: (value, row) => {\r\n if(value){\r\n return (\r\n <a href={`${host}/mathchaDownload/${value}`}>\r\n <DownloadOutlined/>\r\n </a>\r\n \r\n );\r\n }else{\r\n return <span>-</span>\r\n }\r\n },\r\n },\r\n {\r\n title: 'TikZ',\r\n dataIndex: 'tex',\r\n render:(value, row) => {\r\n if(value){\r\n return (\r\n <Button\r\n type=\"dashed\"\r\n shape=\"round\"\r\n icon={<LineChartOutlined />}\r\n onClick={(e)=> showTikz(e,row)}\r\n />\r\n );\r\n }else{\r\n return <span>-</span>\r\n }\r\n },\r\n },\r\n {\r\n title: '삭제',\r\n dataIndex: 'delete',\r\n render: (value, row) => {\r\n return <Button type=\"text\" icon={<DeleteOutlined />} danger onClick={(e)=>removeShowModal(e,row)}/>;\r\n },\r\n },\r\n {\r\n title: '작성자',\r\n dataIndex: 'creator',\r\n },\r\n ];\r\n\r\n const removeShowModal = (e,row) => {\r\n setSelectItem(row);\r\n setMode('single');\r\n setRemoveVisible(true);\r\n };\r\n \r\n const removeItemsShowModal =() => {\r\n setMode('multi');\r\n setRemoveVisible(true);\r\n };\r\n \r\n \r\n\r\n const removeHandleCancel = () => {\r\n\r\n setRemoveVisible(false);\r\n };\r\n const removeHandleOk = async () => {\r\n if(mode === 'single'){\r\n\r\n try{\r\n const result = await removeItem(selectItem.id);\r\n if(result.status==200){\r\n message.info(\"삭제되었습니다.\");\r\n callbackFetch();\r\n setRemoveVisible(false);\r\n }}catch(e){\r\n console.log(e);\r\n message.warn(e);\r\n }\r\n }\r\n if(mode ==='multi'){\r\n \r\n try{\r\n const result = await removeItems(selectItems);\r\n if(result.status==200){\r\n message.info(\"삭제되었습니다.\");\r\n callbackFetch();\r\n setRemoveVisible(false);\r\n }}catch(e){\r\n console.log(e);\r\n message.warn(e);\r\n }\r\n }\r\n\r\n }\r\n\r\n const onSelectChange = selectedRowKeys => {\r\n console.log('selectedRowKeys Changed: ', selectedRowKeys);\r\n setSelectItems(selectedRowKeys);\r\n }\r\n\r\n const onCancelHtml = () => {\r\n setHtml(false);\r\n };\r\n const onCancelMathCha = () => {\r\n setMathcha(false);\r\n };\r\n\r\n const onExit = () => {\r\n setMathcha(false);\r\n };\r\n\r\n const onLeave = () => {\r\n setSelectItem(null);\r\n setTikz(false);\r\n };\r\n\r\n const onHtml = () => {\r\n setHtml(true);\r\n };\r\n\r\n const onMathcha = () => {\r\n setMathcha(true);\r\n };\r\n\r\n const onTikz = () => {\r\n setTikzMode(\"new\")\r\n setTikz(true);\r\n };\r\n\r\n const toggle = () => {\r\n setCollapsed(!collapsed);\r\n };\r\n\r\n const onCollapse = (collapsed, type) => {\r\n //this.setState({ collapsed });\r\n setCollapsed(!collapsed);\r\n };\r\n\r\n\r\n\r\n const rowSelection = {\r\n selectedRowKeys: selectItems, onChange: onSelectChange\r\n };\r\n const hasSelected = selectedRowKeys.length > 0;\r\n\r\n const isAuth = sessionStorage.getItem('isAuth');\r\n const userId = sessionStorage.getItem('id');\r\n if (!isAuth) return <Redirect to=\"/\" />;\r\n\r\n\r\n return (\r\n <Layout>\r\n <Sider\r\n trigger={null}\r\n collapsible\r\n collapsed={!collapsed}\r\n onCollapse={onCollapse}\r\n style={{ height: '100vh' }}>\r\n <img\r\n className=\"mathbank\"\r\n src={mathbank}\r\n alt=\"mathbank\"\r\n onClick={() => window.location.reload()}\r\n style={{\r\n width: 'auto',\r\n height: '54px',\r\n marginLeft: '22px',\r\n marginTop: '10px',\r\n cursor: 'pointer',\r\n }}\r\n />\r\n <Menu\r\n \r\n theme=\"dark\"\r\n defaultSelectedKeys={['1']}\r\n mode=\"inline\"\r\n style={{ fontSize: '18px' }}>\r\n <SubMenu\r\n key=\"sub1\"\r\n icon={<UserOutlined style={{ fontSize: '18px' }} />}\r\n title=\"User's Info\"\r\n style={{ backgroundColor: 'rgb(0, 21, 41)' }}>\r\n <Menu.Item\r\n key=\"1\"\r\n onClick=\"none\"\r\n style={{\r\n width: '200px',\r\n height: '100%',\r\n paddingLeft: '0px',\r\n background: 'rgb(0, 21, 41)',\r\n textAlign: 'center',\r\n }}>\r\n {userId}님 환영합니다.\r\n </Menu.Item>\r\n </SubMenu>\r\n <SubMenu\r\n key=\"sub2\"\r\n icon={<ReadOutlined style={{ fontsize: '15px'}}/>}\r\n title=\"MathCha\"\r\n style={{\r\n backgroundColor: 'rgb(0, 21, 41)'\r\n }}>\r\n <Menu.Item\r\n key=\"1\"\r\n style={{\r\n width: '200px',\r\n height: '100%',\r\n paddingLeft: '0px',\r\n background: 'rgb(0, 21, 41)',\r\n textAlign: 'center',\r\n }}><a href=\"http://mathcha.io\" target=\"_blank\">MathCha 다운로드</a>\r\n </Menu.Item>\r\n <Menu.Item\r\n key=\"2\"\r\n style={{\r\n width: '200px',\r\n height: '100%',\r\n paddingLeft: '0px',\r\n background: 'rgb(0, 21, 41)',\r\n textAlign: 'center',\r\n }}><a href=\"https://m.blog.naver.com/PostView.nhn?blogId=wool613&logNo=221511340406&proxyReferer=https:%2F%2Fwww.google.com%2F\" target=\"_blank\">tikz 간단 설명</a>\r\n </Menu.Item>\r\n <Menu.Item\r\n key=\"3\"\r\n style={{\r\n width: '200px',\r\n height: '100%',\r\n paddingLeft: '0px',\r\n background: 'rgb(0, 21, 41)',\r\n textAlign: 'center',\r\n }}><a href=\"https://www.bu.edu/math/files/2013/08/tikzpgfmanual.pdf\" target=\"_blank\">tikz 상세 메뉴얼</a>\r\n </Menu.Item>\r\n </SubMenu>\r\n </Menu>\r\n </Sider>\r\n <Layout className=\"site-layout\">\r\n <Header className=\"site-layout-background\" style={{ padding: 0 }}>\r\n <MenuOutlined\r\n style={{ marginLeft: '13px' }}\r\n onClick={(collapsed, toggle)}></MenuOutlined>\r\n\r\n <Button className=\"logout\" type=\"default\" onClick={(e)=>{\r\n sessionStorage.removeItem('id');\r\n sessionStorage.removeItem('isAuth');\r\n history.push('/');\r\n \r\n }}>\r\n 로그아웃\r\n </Button>\r\n </Header>\r\n <Content>\r\n <div>\r\n <div style={{ marginBottom: 16 }}>\r\n <span style={{ marginLeft: 8 }}>\r\n {hasSelected ? `Selected ${selectedRowKeys.length} items` : ''}\r\n </span>\r\n </div>\r\n <Button\r\n style={{ display: 'inline-block', top: '0.5vh', left: '8vw' }}\r\n type=\"primary\"\r\n shape=\"round\"\r\n icon={<UploadOutlined />}\r\n onClick={onHtml}>\r\n HTML 업로드\r\n </Button>\r\n <Button\r\n style={{ display: 'inline-block', top: '0.5vh', left: '8.5vw' }}\r\n type=\"primary\"\r\n shape=\"round\"\r\n icon={<UploadOutlined />}\r\n onClick={onMathcha}>\r\n Mathcha 업로드\r\n </Button>\r\n <Button\r\n style={{ display: 'inline-block', top: '0.5vh', left: '9vw' }}\r\n type=\"primary\"\r\n shape=\"round\"\r\n icon={<UploadOutlined />}\r\n onClick={onTikz}>\r\n TikZ 업로드\r\n </Button>\r\n <Button\r\n style={{\r\n display: 'inline-block',\r\n top: '0.5vh',\r\n left: '9.5vw',\r\n }}\r\n type=\"dashed\"\r\n shape=\"round\"\r\n icon={<DeleteOutlined />}\r\n onClick={(e)=>{\r\n console.log(selectItems);\r\n if(selectItems.length>0){\r\n\r\n removeItemsShowModal();\r\n }else{\r\n message.info(\"삭제할 데이터를 선택해 주세요.\");\r\n }\r\n }}\r\n danger>\r\n 선택 삭제\r\n </Button>\r\n\r\n <Button\r\n style={{\r\n display: 'inline-block',\r\n top: '0.5vh',\r\n left: '50vw',\r\n }}className=\"orderWhat\" type=\"default\" onClick={onOrderWhat}>\r\n {orderWhatKor}\r\n </Button>\r\n <Button\r\n style={{\r\n display: 'inline-block',\r\n top: '0.5vh',\r\n left: '50.2vw',\r\n }}className=\"orderKind\" type=\"default\" onClick={onOrderKind}>\r\n {orderKindKor}\r\n </Button>\r\n <Table\r\n rowSelection={rowSelection}\r\n pagination={\r\n { \r\n total: total, \r\n current:currentPage, \r\n pageSize:pageSize,\r\n orderWhat:orderWhat ,\r\n orderKind:orderKind,\r\n onChange:async (page,pageSize)=>{\r\n console.log(page,pageSize);\r\n setCurrentPage(page);\r\n const user = sessionStorage.getItem('id');\r\n const result = await fetchGetData(user,pageSize,page,orderWhat,orderKind);\r\n console.log(pageSize);\r\n if(result){\r\n console.log(result.tikzs);\r\n setData(result.tikzs.map(x=>Object.assign({},x,{key: x.id})));\r\n setTotal(result.total);\r\n setStatus(null);\r\n }\r\n }\r\n }\r\n }\r\n columns={columns}\r\n dataSource={data}\r\n style={{ width: '80vw', marginTop: '1.5vh', marginLeft: '8vw' }}\r\n />\r\n <Modal\r\n title=\"미리보기\"\r\n visible={visible}\r\n centered\r\n width=\"400px\"\r\n height=\"400px\"\r\n onOk={handleOk}\r\n onCancel={handleCancel}>\r\n {\r\n selectItem && <iframe scrolling='no' frameBorder=\"0\" style={{overflow:'hidden' , overflowX:'hidden', overflowY:'hidden' , position:'relative', top:'0px',left:'0px', right:'0px', bottom:'0px' ,height:'300px', width:'350px' }} className=\"iframe\" src={`${host}/htmlPreview/${selectItem.htmlFileName}`}/>\r\n }\r\n </Modal>\r\n <Modal \r\n title=\"다운로드\"\r\n />\r\n <Modal\r\n title=\"삭제하시겠습니까?\"\r\n visible={removeVisible}\r\n onOk={removeHandleOk}\r\n onCancel={removeHandleCancel}\r\n okText=\"확인\"\r\n cancelText=\"취소\"\r\n >\r\n <p>확인을 클릭하시면 삭제됩니다!</p>\r\n </Modal>\r\n <Html visible={html} onCancel={onCancelHtml} callback={callback}></Html>\r\n <Mathcha visible={mathcha} onCancel={onCancelMathCha} callback={callback}></Mathcha>\r\n <Tikz visible={tikz} onLeave={onLeave} callback={callback} selectItem={selectItem} mode={tikzmode}></Tikz>\r\n </div>\r\n </Content>\r\n </Layout>\r\n </Layout>\r\n );\r\n};\r\n\r\nexport default withRouter(Home);\r\n"]},"metadata":{},"sourceType":"module"}