김재형

Implement login

......@@ -4,6 +4,58 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@ant-design/colors": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-3.2.2.tgz",
"integrity": "sha512-YKgNbG2dlzqMhA9NtI3/pbY16m3Yl/EeWBRa+lB1X1YaYxHrxNexiQYCLTWO/uDvAjLFMEDU+zR901waBtMtjQ==",
"requires": {
"tinycolor2": "^1.4.1"
}
},
"@ant-design/css-animation": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/@ant-design/css-animation/-/css-animation-1.7.2.tgz",
"integrity": "sha512-bvVOe7A+r7lws58B7r+fgnQDK90cV45AXuvGx6i5CCSX1W/M3AJnHsNggDANBxEtWdNdFWcDd5LorB+RdSIlBw=="
},
"@ant-design/icons": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-4.2.1.tgz",
"integrity": "sha512-245ZI40MOr5GGws+sNSiJIRRoEf/J2xvPSMgwRYf3bv8mVGQZ6XTQI/OMeV16KtiSZ3D+mBKXVYSBz2fhigOXQ==",
"requires": {
"@ant-design/colors": "^3.1.0",
"@ant-design/icons-svg": "^4.0.0",
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.6",
"insert-css": "^2.0.0",
"rc-util": "^5.0.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"@ant-design/icons-svg": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.1.0.tgz",
"integrity": "sha512-Fi03PfuUqRs76aI3UWYpP864lkrfPo0hluwGqh7NJdLhvH4iRDc3jbJqZIvRDLHKbXrvAfPPV3+zjUccfFvWOQ=="
},
"@ant-design/react-slick": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/@ant-design/react-slick/-/react-slick-0.26.1.tgz",
"integrity": "sha512-1CR3vNFxAMmMb9btF6w9yT1xlrhZr6f/K+OkqoCLfWxN7h7jC16UCr1RsGBoFUdSq8bYfTr3pe6AiiCEDsALvA==",
"requires": {
"classnames": "^2.2.5",
"json2mq": "^0.2.0",
"lodash": "^4.17.15",
"resize-observer-polyfill": "^1.5.0"
}
},
"@babel/code-frame": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz",
......@@ -3041,6 +3093,54 @@
"color-convert": "^2.0.1"
}
},
"antd": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/antd/-/antd-4.3.3.tgz",
"integrity": "sha512-psDb3krf0nK0gkZSfxOGfJdqKbi0hzQJif7R2Cg3T6OV1nrNfc6waL4Th8mV72qq/+Ushuk0afRDaARkx9EzEg==",
"requires": {
"@ant-design/css-animation": "^1.7.2",
"@ant-design/icons": "^4.2.1",
"@ant-design/react-slick": "~0.26.1",
"array-tree-filter": "^2.1.0",
"classnames": "^2.2.6",
"copy-to-clipboard": "^3.2.0",
"lodash": "^4.17.13",
"moment": "^2.25.3",
"omit.js": "^1.0.2",
"raf": "^3.4.1",
"rc-animate": "~3.1.0",
"rc-cascader": "~1.2.0",
"rc-checkbox": "~2.2.0",
"rc-collapse": "~2.0.0",
"rc-dialog": "~8.0.0",
"rc-drawer": "~4.0.0",
"rc-dropdown": "~3.1.2",
"rc-field-form": "~1.4.1",
"rc-input-number": "~5.0.0",
"rc-mentions": "~1.2.0",
"rc-menu": "~8.3.0",
"rc-notification": "~4.4.0",
"rc-pagination": "~2.2.5",
"rc-picker": "~1.6.1",
"rc-progress": "~3.0.0",
"rc-rate": "~2.7.0",
"rc-resize-observer": "^0.2.3",
"rc-select": "~11.0.0",
"rc-slider": "~9.3.0",
"rc-steps": "~4.0.0",
"rc-switch": "~3.2.0",
"rc-table": "~7.7.2",
"rc-tabs": "~11.3.1",
"rc-tooltip": "~4.2.0",
"rc-tree": "~3.3.0",
"rc-tree-select": "~4.0.0",
"rc-trigger": "~4.3.0",
"rc-upload": "~3.1.0",
"rc-util": "^5.0.1",
"scroll-into-view-if-needed": "^2.2.25",
"warning": "^4.0.3"
}
},
"anymatch": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
......@@ -3285,6 +3385,11 @@
"is-string": "^1.0.5"
}
},
"array-tree-filter": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/array-tree-filter/-/array-tree-filter-2.1.0.tgz",
"integrity": "sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw=="
},
"array-union": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
......@@ -3416,6 +3521,11 @@
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
"dev": true
},
"async-validator": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-3.3.0.tgz",
"integrity": "sha512-cAHGD9EL8aCqWXjnb44q94MWiDFzUo1tMhvLb2WzcpWqGiKugsjWG9cvl+jPgkPca7asNbsBU3fa0cwkI/P+Xg=="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
......@@ -3950,7 +4060,6 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"dev": true,
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
......@@ -3959,14 +4068,12 @@
"core-js": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==",
"dev": true
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
"dev": true
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
}
}
},
......@@ -5024,6 +5131,11 @@
}
}
},
"compute-scroll-into-view": {
"version": "1.0.14",
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.14.tgz",
"integrity": "sha512-mKDjINe3tc6hGelUMNDzuhorIUZ7kS7BwyY0r2wQd2HOH2tRuJykiC06iSEX8y1TuhNzvz4GcJnK16mM2J1NMQ=="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
......@@ -5160,6 +5272,14 @@
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
"dev": true
},
"copy-to-clipboard": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz",
"integrity": "sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw==",
"requires": {
"toggle-selection": "^1.0.6"
}
},
"core-js": {
"version": "3.6.5",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz",
......@@ -6081,6 +6201,11 @@
"integrity": "sha512-XBM62jdDc06IXSujkqw6BugEWiDkp6jphtzVJf1kgPQGvfzaU7/jRtRSF/mxc8DBCIm2LS3bN1dCa5Sfxx982A==",
"dev": true
},
"dom-align": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.12.0.tgz",
"integrity": "sha512-YkoezQuhp3SLFGdOlr5xkqZ640iXrnHAwVYcDg8ZKRUtO7mSzSC2BA5V0VuyAwPSJA4CLIc6EDDJh4bEsD2+zA=="
},
"dom-converter": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz",
......@@ -9466,6 +9591,11 @@
"through": "^2.3.6"
}
},
"insert-css": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/insert-css/-/insert-css-2.0.0.tgz",
"integrity": "sha1-610Ql7dUL0x56jBg067gfQU4gPQ="
},
"internal-ip": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz",
......@@ -12335,6 +12465,14 @@
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
"dev": true
},
"json2mq": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/json2mq/-/json2mq-0.2.0.tgz",
"integrity": "sha1-tje9O6nqvhIsg+lyBIOusQ0skEo=",
"requires": {
"string-convert": "^0.2.0"
}
},
"json3": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz",
......@@ -12653,8 +12791,7 @@
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
},
"lodash._reinterpolate": {
"version": "3.0.0",
......@@ -13336,6 +13473,15 @@
}
}
},
"mini-store": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/mini-store/-/mini-store-3.0.5.tgz",
"integrity": "sha512-A7f0+d7TEvjJNY2K+splh2OG3AhmoPoiF3VntlAcJuBzryMumOF9LAVzg8mRJPPbCkz7mlWQg9MCMQPR2auftA==",
"requires": {
"hoist-non-react-statics": "^3.3.2",
"shallowequal": "^1.0.2"
}
},
"minimalistic-assert": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
......@@ -13498,6 +13644,11 @@
"minimist": "^1.2.5"
}
},
"moment": {
"version": "2.26.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.26.0.tgz",
"integrity": "sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw=="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
......@@ -14144,6 +14295,14 @@
"integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==",
"dev": true
},
"omit.js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/omit.js/-/omit.js-1.0.2.tgz",
"integrity": "sha512-/QPc6G2NS+8d4L/cQhbk6Yit1WTB6Us2g84A7A/1+w9d/eRGHyEqC5kkQtHVoHZ5NFWGG7tUGgrhVZwgZanKrQ==",
"requires": {
"babel-runtime": "^6.23.0"
}
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
......@@ -14642,8 +14801,7 @@
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"picomatch": {
"version": "2.2.2",
......@@ -16160,7 +16318,6 @@
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
"integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==",
"dev": true,
"requires": {
"performance-now": "^2.1.0"
}
......@@ -16210,6 +16367,535 @@
}
}
},
"rc-align": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/rc-align/-/rc-align-4.0.0.tgz",
"integrity": "sha512-0mKKfiZGo7VNiRCmnI4MTOG72pBFF0H08zebqcJyXcAm2hgAqTUtvt4I0pjMHh1WdYg+iQDjowpB5X8mZTN2vw==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "2.x",
"dom-align": "^1.7.0",
"rc-util": "^5.0.1",
"resize-observer-polyfill": "^1.5.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-animate": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/rc-animate/-/rc-animate-3.1.0.tgz",
"integrity": "sha512-8FsM+3B1H+0AyTyGggY6JyVldHTs1CyYT8CfTmG/nGHHXlecvSLeICJhcKgRLjUiQlctNnRtB1rwz79cvBVmrw==",
"requires": {
"@ant-design/css-animation": "^1.7.2",
"classnames": "^2.2.6",
"raf": "^3.4.0",
"rc-util": "^5.0.1"
}
},
"rc-cascader": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-1.2.0.tgz",
"integrity": "sha512-exJ6qvaZddARXOjxYQzD0oYrOhNS/WC3E0+xUtAA6yP3RA6PRtzTBWCI4Il4y58X3C+wTjkQq5q1vKxHD76QOA==",
"requires": {
"array-tree-filter": "^2.1.0",
"rc-trigger": "^4.0.0",
"rc-util": "^5.0.1",
"warning": "^4.0.1"
}
},
"rc-checkbox": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/rc-checkbox/-/rc-checkbox-2.2.0.tgz",
"integrity": "sha512-Wjh/nutLA8iIPTT1P9I9KOqlUblVe+CWa3SxMibFySnLyYbMxKNtPhwNcbADPOqzNU0AsCntTduNeJg1n0B5fg==",
"requires": {
"babel-runtime": "^6.23.0",
"classnames": "2.x"
}
},
"rc-collapse": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-2.0.0.tgz",
"integrity": "sha512-R5+Ge1uzwK9G1wZPRPhqQsed4FXTDmU0BKzsqfNBtZdk/wd+yey8ZutmJmSozYc5hQwjPkCvJHV7gOIRZKIlJg==",
"requires": {
"@ant-design/css-animation": "^1.7.2",
"classnames": "2.x",
"rc-animate": "3.x",
"react-is": "^16.7.0",
"shallowequal": "^1.1.0"
}
},
"rc-dialog": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-8.0.1.tgz",
"integrity": "sha512-ZOO2F8KHN4Dkpf1KiXNPKFWaLZutIuAhQw+YCafcFrigDv50AxGivoMSC//k4yjcJr3XRQTQMlMsmdAff4dEhw==",
"requires": {
"babel-runtime": "6.x",
"rc-animate": "3.x",
"rc-util": "^5.0.1"
}
},
"rc-drawer": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/rc-drawer/-/rc-drawer-4.0.1.tgz",
"integrity": "sha512-sQCMV7W5hBjptdHXXKC+YOvZ6sNChDN9Nudd9dA5kJ2ld83yLa54IkEYs4FIb3Ana7yl4kkrgU0B1k2baSsnzw==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.6",
"rc-util": "^5.0.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-dropdown": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/rc-dropdown/-/rc-dropdown-3.1.2.tgz",
"integrity": "sha512-s2W5jqvjTid5DxotGO5FlTBaQWeB+Bu7McQgjB8Ot3Wbl72AIKwLf11+lgbV4mA2vWC1H8DKyn6SW9TKLTi0xg==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.6",
"rc-trigger": "^4.0.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-field-form": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.4.4.tgz",
"integrity": "sha512-1LwZ/I3fRUDzj2JGyfwur4nZqgwybrHy3kf6aKbGeWfYkpNbZaUNkIPfjBBmCdpN6lVPKI7ftRnYtjdBaXzyaw==",
"requires": {
"@babel/runtime": "^7.8.4",
"async-validator": "^3.0.3",
"rc-util": "^5.0.0"
}
},
"rc-input-number": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-5.0.1.tgz",
"integrity": "sha512-4GgnJCjllAVNsZ9fPA+3LnoIgwUqM8QAWpyoKiTkPDN1UWapXYsPiKJCXOhnmiR0X8xpEoYHiobUaiquMliWiQ==",
"requires": {
"classnames": "^2.2.0",
"rc-util": "^5.0.1"
}
},
"rc-mentions": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-1.2.0.tgz",
"integrity": "sha512-9d4AYMuKN4o/ND5r/82rJHMp+R+rn1b+f8ZmWsI/1NlWtMqVn9Q7yxofqbX78zgV6+nppsMvMqtduJhgQkVl0Q==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.6",
"rc-menu": "^8.0.1",
"rc-trigger": "^4.3.0",
"rc-util": "^5.0.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-menu": {
"version": "8.3.1",
"resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-8.3.1.tgz",
"integrity": "sha512-4LNQ0zIL27yayQu9Xi3QOUB2yEqm5qSFwD9MzB1XnTo1JeLTLy3+D8Bm94rykvnhV6z5MYtalUTnM7ETfjExXQ==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "2.x",
"mini-store": "^3.0.1",
"rc-animate": "^3.1.0",
"rc-trigger": "^4.2.0",
"rc-util": "^5.0.1",
"resize-observer-polyfill": "^1.5.0",
"shallowequal": "^1.1.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-notification": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-4.4.0.tgz",
"integrity": "sha512-IDeNAFGVeOsy1tv4zNVqMAXB9tianR80ewQbtObaAQfjwAjWfONdqdyjFkEU6nc6UQhSUYA5OcTGb7kwwbnh0g==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "2.x",
"rc-animate": "3.x",
"rc-util": "^5.0.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-pagination": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-2.2.5.tgz",
"integrity": "sha512-7hMFNi8R7C/4cLKgmSpUb3BfMFdt4DLrjTixSRMpMBR5jwGfwRyoV9g9Tm6gCuCaAlVAX1QNtlM1T2UqEOW5lw==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-picker": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-1.6.3.tgz",
"integrity": "sha512-SBaTUZDr+q89s21dF4wi8Ag+Kecv2x7QfufopV4eASm/WXWnvxIP4pCbedqP02jJQMGt290KNlIiffVNqscs5A==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.1",
"moment": "^2.24.0",
"rc-trigger": "^4.0.0",
"rc-util": "^5.0.1",
"shallowequal": "^1.1.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-progress": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/rc-progress/-/rc-progress-3.0.0.tgz",
"integrity": "sha512-dQv1KU3o6Vay604FMYMF4S0x4GNXAgXf1tbQ1QoxeIeQt4d5fUeB7Ri82YPu+G+aRvH/AtxYAlEcnxyVZ1/4Hw==",
"requires": {
"classnames": "^2.2.6"
}
},
"rc-rate": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/rc-rate/-/rc-rate-2.7.0.tgz",
"integrity": "sha512-XD+1tnmKa3Ykm6jVX2ZiwIWdv+DG1t7LDK3dojeFoS8GgA7W3oqW5R/UpJ66qrLYpPHw9N4pYJKWySiPKtPsLQ==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.5",
"rc-util": "^5.0.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-resize-observer": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-0.2.3.tgz",
"integrity": "sha512-dEPCGX15eRRnu+TNBIGyEghpzE24fTDW8pHdJPJS/kCR3lafFqBLqKzBgZW6pMUuM70/ZDyFQ0Kynx9kWsXRNw==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.1",
"rc-util": "^5.0.0",
"resize-observer-polyfill": "^1.5.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-select": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/rc-select/-/rc-select-11.0.0.tgz",
"integrity": "sha512-TG3I5RkTFNkDo1cNgQHccRdrL29+o61yx6UmfZ8kZ8MCKn7f7FYld3Tey0PGcQOJ4RnzBOCySp+tGakYl94NKQ==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "2.x",
"rc-animate": "^3.0.0",
"rc-trigger": "^4.3.0",
"rc-util": "^5.0.1",
"rc-virtual-list": "^1.1.2",
"warning": "^4.0.3"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-slider": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-9.3.0.tgz",
"integrity": "sha512-9QPRjK8qFYO8L/Cn//O/K4g4dSU1glgvAdeT9qBLmjXtdYSiJ9u3YulcdbHWHo9Y3IE1dyaVm4m4ll2FWdDyqg==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.5",
"rc-tooltip": "^4.0.0",
"rc-util": "^5.0.0",
"shallowequal": "^1.1.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-steps": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/rc-steps/-/rc-steps-4.0.0.tgz",
"integrity": "sha512-Vy0T2sC+1ElpovEB97mYNVR5GYNYSzMiRJFumera5gZL2bH6FcxYioXcq/HYCPN//YC+b/Fs37x4G/WpGMuaVw==",
"requires": {
"@babel/runtime": "^7.10.2",
"classnames": "^2.2.3",
"rc-util": "^5.0.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-switch": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/rc-switch/-/rc-switch-3.2.0.tgz",
"integrity": "sha512-WQZnRrWZ+KGh4Cd98FpP1ZgvMmebctoHzKAO2n1Xsry1FQBSGgIw4rQJRxET31VS/dR1LIKb5md/k0UzcXXc0g==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.1",
"rc-util": "^5.0.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-table": {
"version": "7.7.2",
"resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.7.2.tgz",
"integrity": "sha512-LcCOYmnIKFPNFDbJpD6yUpTyQytoQL0nXoyuG4FWJROMJzmhVhpVQZ83YjFOAlZjwx0Ixz04yPkMvRq6xr9vXQ==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.5",
"raf": "^3.4.1",
"rc-resize-observer": "^0.2.0",
"rc-util": "^5.0.0",
"shallowequal": "^1.1.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-tabs": {
"version": "11.3.2",
"resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-11.3.2.tgz",
"integrity": "sha512-UQQrVmBZm/LrgS5GHPZNpzedTV5ppU1f8dvTV2TX/zmV8byaOVd2uJ9F/f4zkXTvsTLxGzFfCrb6nAn1cwSBLw==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "2.x",
"raf": "^3.4.1",
"rc-dropdown": "^3.1.0",
"rc-menu": "^8.2.1",
"rc-resize-observer": "^0.2.1",
"rc-trigger": "^4.2.1",
"rc-util": "^5.0.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-tooltip": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-4.2.1.tgz",
"integrity": "sha512-oykuaGsHg7RFvPUaxUpxo7ScEqtH61C66x4JUmjlFlSS8gSx2L8JFtfwM1D68SLBxUqGqJObtxj4TED75gQTiA==",
"requires": {
"rc-trigger": "^4.2.1"
}
},
"rc-tree": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-3.3.1.tgz",
"integrity": "sha512-DGyVZN4HRSrmFErn68KOISIl3z0R9EjeNyZE0sgAaa5oqpQDAEK78/lYf5k3rot1N/iFAEJKaTRJfM7eIdWGwg==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "2.x",
"rc-animate": "^3.1.0",
"rc-util": "^5.0.0",
"rc-virtual-list": "^1.1.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-tree-select": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/rc-tree-select/-/rc-tree-select-4.0.1.tgz",
"integrity": "sha512-VehfIZgu6Xmko7YfJgshmuIdeI7u7Ar1iLkmlb69/w1HjaDnSHbV3N3xopLABAq8lTlTAnSFU2JCPcYifvTmAA==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "2.x",
"rc-select": "^11.0.0",
"rc-tree": "^3.1.0",
"rc-util": "^5.0.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-trigger": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-4.3.0.tgz",
"integrity": "sha512-jnGNzosXmDdivMBjPCYe/AfOXTpJU2/xQ9XukgoXDQEoZq/9lcI1r7eUIfq70WlWpLxlUEqQktiV3hwyy6Nw9g==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.6",
"raf": "^3.4.1",
"rc-align": "^4.0.0",
"rc-animate": "^3.0.0",
"rc-util": "^5.0.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.10.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
},
"rc-upload": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-3.1.4.tgz",
"integrity": "sha512-G6nqT4HMrT+mDd32ZHfcFs2eCFilMdIdteylNCHPcfoBBOKkBW4iVo7O6uFhz/8jIGNLJfR3+6S2x/lnXYYrCQ==",
"requires": {
"classnames": "^2.2.5"
}
},
"rc-util": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.0.4.tgz",
"integrity": "sha512-cd19RCrE0DJH6UcJ9+V3eaXA/5sNWyVKOKkWl8ZM2OqgNzVb8fv0obf/TkuvSN43tmTsgqY8k7OqpFYHhmef8g==",
"requires": {
"react-is": "^16.12.0",
"shallowequal": "^1.1.0"
}
},
"rc-virtual-list": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-1.1.5.tgz",
"integrity": "sha512-roZ6HE5MNKaiop+Ic7jZS7xlMnXBLp0XBElsMbE4eEL3GnnnJAet2iXoT5wjKcKMXEVyVCD0L4yQozmH7+Kgxg==",
"requires": {
"classnames": "^2.2.6",
"raf": "^3.4.1",
"rc-util": "^5.0.0"
}
},
"react": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz",
......@@ -17020,6 +17706,11 @@
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
"dev": true
},
"resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"resolve": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.0.tgz",
......@@ -17623,6 +18314,14 @@
"ajv-keywords": "^3.4.1"
}
},
"scroll-into-view-if-needed": {
"version": "2.2.25",
"resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.25.tgz",
"integrity": "sha512-C8RKJPq9lK7eubwGpLbUkw3lklcG3Ndjmea2PyauzrA0i4DPlzAmVMGxaZrBFqCrVLfvJmP80IyHnv4jxvg1OQ==",
"requires": {
"compute-scroll-into-view": "^1.0.14"
}
},
"scss-tokenizer": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz",
......@@ -17886,8 +18585,7 @@
"shallowequal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==",
"dev": true
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="
},
"shebang-command": {
"version": "2.0.0",
......@@ -18481,6 +19179,11 @@
"integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==",
"dev": true
},
"string-convert": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz",
"integrity": "sha1-aYLMMEn7tM2F+LJFaLnZvznu/5c="
},
"string-length": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz",
......@@ -19077,6 +19780,11 @@
"resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
},
"tinycolor2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz",
"integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g="
},
"tmp": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
......@@ -19134,6 +19842,11 @@
"is-number": "^7.0.0"
}
},
"toggle-selection": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
"integrity": "sha1-bkWxJj8gF/oKzH2J14sVuL932jI="
},
"toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
......@@ -19585,6 +20298,14 @@
"makeerror": "1.0.x"
}
},
"warning": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
"requires": {
"loose-envify": "^1.0.0"
}
},
"watchpack": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz",
......
......@@ -4,6 +4,8 @@
"description": "Dropbox alternative cloud file service",
"private": true,
"dependencies": {
"@ant-design/icons": "^4.2.1",
"antd": "^4.3.3",
"classnames": "^2.2.6",
"ky": "^0.20.0",
"miragejs": "^0.1.40",
......
import React from "react";
import React, { Fragment } from "react";
import { Switch, Route, Redirect } from "react-router-dom";
import { Login } from "auth/Login";
import { useAuth } from "auth/useAuth";
export function App() {
return <div>Hello World!</div>;
const { token, login } = useAuth();
return (
<Fragment>
<Switch>
<Route path="/login">
<Login login={login} />
</Route>
</Switch>
{token === null && <Redirect to="/login" />}
</Fragment>
);
}
......
.layout {
height: 100%;
align-items: center;
justify-content: center;
}
.content {
width: 640px;
flex-grow: 0;
background: #fff;
padding: 80px 50px 50px;
}
#components-form-demo-normal-login .login-form-forgot {
float: right;
}
#components-form-demo-normal-login .ant-col-rtl .login-form-forgot {
float: left;
}
#components-form-demo-normal-login .login-form-button {
width: 100%;
}
import React, { useCallback, useState } from "react";
import { Form, Input, Button, Checkbox, Layout } from "antd";
import { UserOutlined, LockOutlined } from "@ant-design/icons";
import { useHistory } from "react-router-dom";
import styles from "./Login.module.scss";
export type LoginProps = {
login: (
username: string,
password: string,
remember: boolean
) => Promise<void>;
};
export function Login({ login }: LoginProps) {
const [error, setError] = useState<boolean>(false);
const history = useHistory();
const handleLogin = useCallback(
async ({ username, password, remember }) => {
setError(false);
try {
await login(username, password, remember);
history.push("/");
} catch {
setError(true);
}
},
[login, history]
);
return (
<Layout className={styles.layout}>
<Layout.Content className={styles.content}>
<Form
name="login"
initialValues={{ remember: true }}
onFinish={handleLogin}
>
<Form.Item
name="username"
rules={[{ required: true, message: "아이디를 입력하세요" }]}
{...(error && {
validateStatus: "error",
})}
>
<Input prefix={<UserOutlined />} placeholder="아이디" />
</Form.Item>
<Form.Item
name="password"
rules={[{ required: true, message: "Please input your Password!" }]}
{...(error && {
validateStatus: "error",
help: "로그인에 실패했습니다",
})}
>
<Input
prefix={<LockOutlined />}
type="password"
placeholder="비밀번호"
/>
</Form.Item>
<Form.Item>
<Form.Item name="remember" valuePropName="checked" noStyle>
<Checkbox>자동 로그인</Checkbox>
</Form.Item>
</Form.Item>
<Form.Item>
<Button type="primary" htmlType="submit">
로그인
</Button>
</Form.Item>
</Form>
</Layout.Content>
</Layout>
);
}
import { useState, useCallback } from "react";
import ky from "ky";
interface LoginResponse {
status: number;
data: {
access_token: string;
refresh_token: string;
expiration: string;
};
}
interface Token {
accessToken: string;
refreshToken: string;
expiration: Date;
}
export function useAuth() {
const [token, setToken] = useState<Token | null>(() => {
const item = localStorage.getItem("token");
if (item) {
const token = JSON.parse(item);
token.expiration = new Date(token.expiration);
return token;
}
return null;
});
const login = useCallback(
async (username: string, password: string, remember: boolean) => {
const response = await ky
.post("/users/login", {
json: {
user_id: username,
password: password,
},
})
.json<LoginResponse>();
const token = {
accessToken: response.data.access_token,
refreshToken: response.data.refresh_token,
expiration: new Date(response.data.expiration),
};
setToken(token);
if (remember) {
localStorage.setItem("token", JSON.stringify(token));
}
},
[]
);
return { token, login };
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
#root {
height: 100%;
}
......
import React from "react";
import ReactDOM from "react-dom";
import { BrowserRouter } from "react-router-dom";
import "antd/dist/antd.css";
import "./index.css";
import { App } from "./App";
......@@ -10,9 +12,9 @@ import * as serviceWorker from "./serviceWorker";
import "./server";
ReactDOM.render(
<React.StrictMode>
<BrowserRouter>
<App />
</React.StrictMode>,
</BrowserRouter>,
document.getElementById("root")
);
......
......@@ -46,8 +46,6 @@ createServer({
factories: {},
routes() {
this.namespace = "api";
this.get("/items/:item_id/children", (schema, request) => {
const directory = schema.find("item", request.params.item_id);
if (!directory || !directory.is_folder) {
......