diff --git a/.babelrc b/.babelrc index 0960c01..2b7bafa 100644 --- a/.babelrc +++ b/.babelrc @@ -1,6 +1,3 @@ { - "presets": [ - "@babel/preset-env", - "@babel/preset-react" - ] -} \ No newline at end of file + "presets": ["@babel/preset-env", "@babel/preset-react"] +} diff --git a/.eslintrc.js b/.eslintrc.js index fd39030..f4a3d4f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -42,4 +42,11 @@ module.exports = { }, }, }, + settings: { + 'import/resolver': { + webpack: { + config: 'webpack.config.js', + }, + }, + }, }; diff --git a/favicon.png b/favicon.png new file mode 100644 index 0000000..1a6d89f Binary files /dev/null and b/favicon.png differ diff --git a/package-lock.json b/package-lock.json index 9a229dc..940ecad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1443,7 +1443,6 @@ "version": "10.0.29", "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-10.0.29.tgz", "integrity": "sha512-fU2VtSVlHiF27empSbxi1O2JFdNWZO+2NFHfwO0pxgTep6Xa3uGb+3pVKfLww2l/IBGLNEZl5Xf/++A4wAYDYQ==", - "dev": true, "requires": { "@emotion/sheet": "0.9.4", "@emotion/stylis": "0.8.5", @@ -1452,10 +1451,9 @@ } }, "@emotion/core": { - "version": "10.0.35", - "resolved": "https://registry.npmjs.org/@emotion/core/-/core-10.0.35.tgz", - "integrity": "sha512-sH++vJCdk025fBlRZSAhkRlSUoqSqgCzYf5fMOmqqi3bM6how+sQpg3hkgJonj8GxXM4WbD7dRO+4tegDB9fUw==", - "dev": true, + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@emotion/core/-/core-10.1.1.tgz", + "integrity": "sha512-ZMLG6qpXR8x031NXD8HJqugy/AZSkAuMxxqB46pmAR7ze47MhNJ56cdoX243QPZdGctrdfo+s08yZTiwaUcRKA==", "requires": { "@babel/runtime": "^7.5.5", "@emotion/cache": "^10.0.27", @@ -1469,7 +1467,6 @@ "version": "10.0.27", "resolved": "https://registry.npmjs.org/@emotion/css/-/css-10.0.27.tgz", "integrity": "sha512-6wZjsvYeBhyZQYNrGoR5yPMYbMBNEnanDrqmsqS1mzDm1cOTu12shvl2j4QHNS36UaTE0USIJawCH9C8oW34Zw==", - "dev": true, "requires": { "@emotion/serialize": "^0.11.15", "@emotion/utils": "0.11.3", @@ -1498,7 +1495,6 @@ "version": "0.11.16", "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-0.11.16.tgz", "integrity": "sha512-G3J4o8by0VRrO+PFeSc3js2myYNOXVJ3Ya+RGVxnshRYgsvErfAOglKAiy1Eo1vhzxqtUvjCyS5gtewzkmvSSg==", - "dev": true, "requires": { "@emotion/hash": "0.8.0", "@emotion/memoize": "0.7.4", @@ -1510,16 +1506,14 @@ "csstype": { "version": "2.6.13", "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.13.tgz", - "integrity": "sha512-ul26pfSQTZW8dcOnD2iiJssfXw0gdNVX9IJDH/X3K5DGPfj+fUYe3kB+swUY6BF3oZDxaID3AJt+9/ojSAE05A==", - "dev": true + "integrity": "sha512-ul26pfSQTZW8dcOnD2iiJssfXw0gdNVX9IJDH/X3K5DGPfj+fUYe3kB+swUY6BF3oZDxaID3AJt+9/ojSAE05A==" } } }, "@emotion/sheet": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-0.9.4.tgz", - "integrity": "sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA==", - "dev": true + "integrity": "sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA==" }, "@emotion/styled": { "version": "10.0.27", @@ -1556,14 +1550,12 @@ "@emotion/utils": { "version": "0.11.3", "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-0.11.3.tgz", - "integrity": "sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw==", - "dev": true + "integrity": "sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw==" }, "@emotion/weak-memoize": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz", - "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==", - "dev": true + "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==" }, "@eslint/eslintrc": { "version": "0.1.3", @@ -2880,26 +2872,7 @@ "dotenv": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", - "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==", - "dev": true - }, - "dotenv-defaults": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/dotenv-defaults/-/dotenv-defaults-1.1.1.tgz", - "integrity": "sha512-6fPRo9o/3MxKvmRZBD3oNFdxODdhJtIy1zcJeUSCs6HCy4tarUpd+G67UTU9tF6OWXeSPqsm4fPAB+2eY9Rt9Q==", - "dev": true, - "requires": { - "dotenv": "^6.2.0" - } - }, - "dotenv-webpack": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/dotenv-webpack/-/dotenv-webpack-1.8.0.tgz", - "integrity": "sha512-o8pq6NLBehtrqA8Jv8jFQNtG9nhRtVqmoD4yWbgUyoU3+9WBlPe+c2EAiaJok9RB28QvrWvdWLZGeTT5aATDMg==", - "dev": true, - "requires": { - "dotenv-defaults": "^1.0.2" - } + "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==" }, "has-flag": { "version": "4.0.0", @@ -3725,8 +3698,7 @@ "@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, "@types/parse5": { "version": "5.0.3", @@ -5067,7 +5039,6 @@ "version": "10.0.33", "resolved": "https://registry.npmjs.org/babel-plugin-emotion/-/babel-plugin-emotion-10.0.33.tgz", "integrity": "sha512-bxZbTTGz0AJQDHm8k6Rf3RQJ8tX2scsfsRyKVgAbiUPUNIRtlK+7JxP+TAd1kRLABFxe0CFm2VdK4ePkoA9FxQ==", - "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@emotion/hash": "0.8.0", @@ -5119,7 +5090,6 @@ "version": "2.8.0", "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz", "integrity": "sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==", - "dev": true, "requires": { "@babel/runtime": "^7.7.2", "cosmiconfig": "^6.0.0", @@ -6088,8 +6058,7 @@ "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, "camel-case": { "version": "4.1.1", @@ -6761,7 +6730,6 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, "requires": { "safe-buffer": "~5.1.1" } @@ -6847,7 +6815,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", - "dev": true, "requires": { "@types/parse-json": "^4.0.0", "import-fresh": "^3.1.0", @@ -7902,12 +7869,27 @@ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" }, + "dotenv-defaults": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/dotenv-defaults/-/dotenv-defaults-1.1.1.tgz", + "integrity": "sha512-6fPRo9o/3MxKvmRZBD3oNFdxODdhJtIy1zcJeUSCs6HCy4tarUpd+G67UTU9tF6OWXeSPqsm4fPAB+2eY9Rt9Q==", + "dev": true + }, "dotenv-expand": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", "dev": true }, + "dotenv-webpack": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/dotenv-webpack/-/dotenv-webpack-1.8.0.tgz", + "integrity": "sha512-o8pq6NLBehtrqA8Jv8jFQNtG9nhRtVqmoD4yWbgUyoU3+9WBlPe+c2EAiaJok9RB28QvrWvdWLZGeTT5aATDMg==", + "dev": true, + "requires": { + "dotenv-defaults": "^1.0.2" + } + }, "duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", @@ -8162,7 +8144,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, "requires": { "is-arrayish": "^0.2.1" } @@ -9808,8 +9789,7 @@ "find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "dev": true + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" }, "find-up": { "version": "4.1.0", @@ -11417,7 +11397,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", - "dev": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -11426,8 +11405,7 @@ "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" } } }, @@ -11809,8 +11787,7 @@ "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, "is-binary-path": { "version": "2.1.0", @@ -14136,8 +14113,7 @@ "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "json-schema": { "version": "0.2.3", @@ -14359,14 +14335,6 @@ "core-js": "^3.0.4", "dotenv": "^8.0.0", "dotenv-expand": "^5.1.0" - }, - "dependencies": { - "dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", - "dev": true - } } }, "leven": { @@ -14397,8 +14365,7 @@ "lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, "listr": { "version": "0.14.3", @@ -16247,7 +16214,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "requires": { "callsites": "^3.0.0" } @@ -16283,7 +16249,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", - "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -16374,8 +16339,7 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "path-to-regexp": { "version": "0.1.7", @@ -16386,8 +16350,7 @@ "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, "pbkdf2": { "version": "3.1.1", @@ -17880,6 +17843,14 @@ "throttle-debounce": "^2.1.0" } }, + "react-spinners": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/react-spinners/-/react-spinners-0.9.0.tgz", + "integrity": "sha512-+x6eD8tn/aYLdxZjNW7fSR1uoAXLb9qq6TFYZR1dFweJvckcf/HfP8Pa/cy5HOvB/cvI4JgrYXTjh2Me3S6Now==", + "requires": { + "@emotion/core": "^10.0.15" + } + }, "react-syntax-highlighter": { "version": "12.2.1", "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-12.2.1.tgz", @@ -18538,7 +18509,6 @@ "version": "1.17.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, "requires": { "path-parse": "^1.0.6" } @@ -22601,8 +22571,7 @@ "yaml": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", - "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", - "dev": true + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==" }, "yargs": { "version": "13.3.2", diff --git a/package.json b/package.json index 7165585..9760dc8 100644 --- a/package.json +++ b/package.json @@ -85,6 +85,7 @@ "react-redux": "^7.2.1", "react-router-dom": "^5.2.0", "react-router-prop-types": "^1.0.5", + "react-spinners": "^0.9.0", "redux": "^4.0.5", "redux-thunk": "^2.3.0", "simple-peer": "^9.7.2", diff --git a/src/App.js b/src/App.js index 2501de7..71466f3 100644 --- a/src/App.js +++ b/src/App.js @@ -3,6 +3,8 @@ import { Route, Switch } from 'react-router-dom'; import styled from 'styled-components'; import { useSelector } from 'react-redux'; +import SyncLoader from 'react-spinners/SyncLoader'; + import LandingPage from '@pages/LandingPage'; import AuthRoute from '@components/AuthRoute'; @@ -12,7 +14,11 @@ import NotFound from '@pages/404'; import LoginPage from '@pages/LoginPage'; import QuestionListPage from '@pages/QuestionListPage'; import QuestionPage from '@pages/QuestionPage'; + +import SelfTrainEntryPage from '@pages/SelfTrainEntryPage'; +import SelfTrainSettingPage from '@pages/SelfTrainSettingPage'; import SelfTrainPage from '@pages/SelfTrainPage'; + import AloneQuestionCheckList from '@pages/AloneQuestionCheckList'; import MyPage from '@pages/MyPage'; import StudyMainPage from '@pages/StudyMainPage'; @@ -25,9 +31,18 @@ const Wrapper = styled.div` display: flex; `; +const WrapSpinner = styled.div` + z-index: 30; + height: 100vh; + width: 100vw; + display: flex; + justify-content: center; + align-items: center; +`; + export default function App() { const { name } = useSelector(get('auth')); - const { toggleTrain } = useSelector(get('time')); + const { toggleTrain, isLoading } = useSelector(get('train')); return ( <> @@ -36,15 +51,35 @@ export default function App() { + {isLoading && ( + + + + )} - {!toggleTrain && } - {!toggleTrain && } - - - - - - + <> + {!toggleTrain && } + {!toggleTrain && } + + + + + + + + + diff --git a/src/assets/images/middle_end_background.png b/src/assets/images/middle_end_background.png index a7053d9..e0c2228 100644 Binary files a/src/assets/images/middle_end_background.png and b/src/assets/images/middle_end_background.png differ diff --git a/src/components/Button/Button.js b/src/components/Button/Button.js index 77c6d2f..8584a14 100644 --- a/src/components/Button/Button.js +++ b/src/components/Button/Button.js @@ -11,13 +11,14 @@ const Box = styled.div` height: 60px; border-radius: 10px; user-select: none; - &: hover { + ${({ theme }) => theme === 'blue' + && `&: hover { opacity: 70%; - } + }`} ${({ theme }) => (theme === 'blue' ? 'background-image : linear-gradient(to bottom, #2323de -16%, #5f5fd9 122%);' : theme === 'gray' - ? 'background-color: #f6f6f6;' + ? 'background-color: #f6f6f6; pointer-events: none;' : theme === 'outline' ? 'background-color: white; border: solid 2px #6e6eff;' : theme === 'white' diff --git a/src/components/Checkbox/Checkbox.js b/src/components/Checkbox/Checkbox.js index 778891c..f7f090c 100644 --- a/src/components/Checkbox/Checkbox.js +++ b/src/components/Checkbox/Checkbox.js @@ -59,12 +59,10 @@ const Checkmark = styled.span` } `; -export default function Checkbox({ - className, -}) { +export default function Checkbox({ className, func }) { return ( - + ); @@ -72,8 +70,10 @@ export default function Checkbox({ Checkbox.propTypes = { className: PropTypes.string, + func: PropTypes.func, }; Checkbox.defaultProps = { className: '', + func: () => {}, }; diff --git a/src/components/Icon/Icon.js b/src/components/Icon/Icon.js index 04aaca4..be4b92f 100644 --- a/src/components/Icon/Icon.js +++ b/src/components/Icon/Icon.js @@ -104,8 +104,8 @@ background-position: ${({ type }) => (type === 'bubble_white' ? '-44px -36px' : type === 'exit_blue' ? '-215px -594px' : type === 'check_large' ? '-369.5px -581px' : type === 'check_rec' ? '-541px -581px' - : type === 'thumb_up_white' ? '-707px -575px' - : type === 'thumb_down_white' ? '-878.5px -575px' + : type === 'thumb_up_white' ? '-695px -564px' + : type === 'thumb_down_white' ? '-871px -564px' : type === 'sound_big' ? '-71px -712px' : type === 'bubble_big' ? '-250px -712px' : type === 'memo_big' ? '-429px -712px' @@ -144,13 +144,10 @@ export default function Icon({ if (type === 'play_pupple' || type === 'cancel_circle' || type === 'pause' || type === 'play_blue' || type === 'cam' || type === 'audio' || type === 'capture') { setSize('mlg'); } - if (type === 'check_large' || type === 'check_rec' || type === 'thumb_up_white' || type === 'thumb_down_white') { + if (type === 'check_large' || type === 'check_rec') { setSize('slg'); } - if (type === 'thumb_up_white' || type === 'thumb_down_white') { - setSize('mxlg'); - } - if (type === 'sound_big' || type === 'bubble_big' || type === 'memo_big' || type === 'star_big' || type === 'thumb_up_big' || type === 'thumb_down_big' || type === 'profile_big') { + if (type === 'sound_big' || type === 'bubble_big' || type === 'memo_big' || type === 'star_big' || type === 'thumb_up_big' || type === 'thumb_down_big' || type === 'profile_big' || type === 'thumb_up_white' || type === 'thumb_down_white') { setSize('xxlg'); } if (type === 'check_square') { diff --git a/src/components/InputBar/InputBar.js b/src/components/InputBar/InputBar.js index 1513653..1433d43 100644 --- a/src/components/InputBar/InputBar.js +++ b/src/components/InputBar/InputBar.js @@ -16,12 +16,15 @@ const Wrapper = styled.input` color: #9e9e9e; &:focus { outline: none; - border-bottom: 3px solid #5f5fd9; + border-bottom: 2px solid #5f5fd9; color: #3d3d3d; } `; export default function InputBar({ + disabled, + autoFocus, + value, className, placeholder, onChange, @@ -31,6 +34,9 @@ export default function InputBar({ }) { return ( {}, diff --git a/src/components/Modal/EvaluationModal/EvaluationModal.js b/src/components/Modal/EvaluationModal/EvaluationModal.js new file mode 100644 index 0000000..8a3e44c --- /dev/null +++ b/src/components/Modal/EvaluationModal/EvaluationModal.js @@ -0,0 +1,216 @@ +import React, { useState } from 'react'; +import styled from 'styled-components'; +import { useDispatch } from 'react-redux'; +import { hideModal } from '@store/Modal/modal'; +import Icon from '@components/Icon'; +import Button from '@components/Button'; +import { MODALS } from '@utils/constant'; + +const Wrapper = styled.div` + display: flex; + flex-direction: column; + align-items: center; + width: 616px; + height: 639px; + border-radius: 10px; + box-shadow: 0 6px 12px 0 rgba(4, 4, 161, 0.04); + background-color: #ffffff; +`; + +const IconWrapper = styled.div` + margin-left: auto; + margin-right: 36px; + margin-top: 36px; +`; + +const ResultText = styled.div` + margin-top: 10px; + font-family: AppleSDGothicNeoEB00; + font-size: 36px; + font-weight: normal; + font-stretch: normal; + font-style: normal; + line-height: 1.44; + letter-spacing: normal; + text-align: left; + color: #000000; +`; + +const ScoreText = styled.div` + margin-top: 35px; + font-family: AppleSDGothicNeoB00; + font-size: 24px; + font-weight: normal; + font-stretch: normal; + font-style: normal; + line-height: 1.42; + letter-spacing: normal; + text-align: center; + color: #3d3d3d; +`; + +const ScoreWrapper = styled.div` + display: flex; + height: 54px; + align-items: center; + margin-top: 25px; +`; + +const Box = styled.div` + display: flex; + align-items: center; + justify-content: center; + width: ${({ size }) => (size === 'big' ? '40px' : '36.5px')}; + height: ${({ size }) => (size === 'big' ? '40px' : '36.5px')}; + margin: 0 12.5px; + border-radius: 8px; + background-color: rgba(211,211,211,${({ size }) => (size === 'big' ? '1' : '0.4')}); + font-family: AppleSDGothicNeoM00; + font-size: ${({ size }) => (size === 'big' ? '20px' : '14px')}; + font-weight: normal; + font-stretch: normal; + font-style: normal; + line-height: 1.29; + letter-spacing: normal; + text-align: center; + color: #ffffff; +`; + +const ScoreBox = styled.div` + display: flex; + align-items: center; + justify-content: center; + width: 53px; + height: 53px; + margin: 0 12.5px; + border-radius: 10px; + box-shadow: 0 6px 9px 0 rgba(4, 4, 161, 0.04); + background-image: linear-gradient(to bottom, #2323de -16%, #5f5fd9 122%); + font-family: AppleSDGothicNeoM00; + font-size: 27px; + font-weight: normal; + font-stretch: normal; + font-style: normal; + line-height: 1.1; + letter-spacing: normal; + text-align: center; + color: #ffffff; +`; + +const Text = styled.div` + height: ${({ height }) => height}px; +`; + +const Margin = styled.div` + width: 30px; +`; + +const EvaluateWrapper = styled.div` + display: flex; + margin-top: 30px; + margin-bottom: 40px; +`; + +const EvaluateBox = styled.div` + display: flex; + margin: 0 60px; + flex-direction: column; + align-items: center; + .${({ evaluate }) => evaluate} { + font-weight: 700; + } +`; + +const EvaluateText = styled.div` + margin-top: 20px; + font-family: AppleSDGothicNeoM00; + font-size: 20px; + font-stretch: normal; + font-style: normal; + font-weight: normal; + line-height: 1.3; + letter-spacing: normal; + text-align: center; + color: #3d3d3d; +`; + +export default function EvaluationModal() { + const dispatch = useDispatch(); + const [score, setScore] = useState(9); + const [evaluate, setEvaluate] = useState(''); + + const handleCount = (val) => { + setScore(score + val); + }; + + const handleEvaluate = (val) => { + setEvaluate(val); + }; + + const handleButtonClick = () => { + // TODO: api연동 + dispatch(hideModal(MODALS.EVALUATION_MODAL)); + }; + + const calScore = (val) => ((score + val) % 10) + 1; + + return ( + + + dispatch(hideModal(MODALS.EVALUATION_MODAL))} /> + + + 면접 최종 평가 + + + 홍길동님의 면접 점수를 입력해주세요. + + + handleCount(-1)} /> + + + + {calScore(-2)} + + + + + {calScore(-1)} + + + + + {calScore(0)} + + + + + {calScore(1)} + + + + + {calScore(2)} + + + + handleCount(1)} /> + + + handleEvaluate('pass')} evaluate={evaluate}> + + + 합격이에요! + + + handleEvaluate('fail')} evaluate={evaluate}> + + + 불합격이에요.. + + + +