diff --git a/README.md b/README.md new file mode 100644 index 0000000..9301f3b --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Frontend \ No newline at end of file diff --git a/fitness-web/.env b/fitness-web/.env deleted file mode 100644 index 7f46a2b..0000000 --- a/fitness-web/.env +++ /dev/null @@ -1,5 +0,0 @@ -REACT_APP_API_URL=https://dev.fitness-bro.pro -REACT_APP_GOOGLE_REDIRECT_URI=http://localhost:3000/ -REACT_APP_WEBSOCKET_URI=http://localhost:3000/ -REACT_APP_GOOGLE_CLIENT_ID=293755776535-kp2pp4pfe0c4401civ1g2fum81f3etdo.apps.googleusercontent.com -REACT_APP_GOOGLE_SCOPE=https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile \ No newline at end of file diff --git a/fitness-web/.gitignore b/fitness-web/.gitignore index 34f0daf..4d29575 100644 --- a/fitness-web/.gitignore +++ b/fitness-web/.gitignore @@ -13,14 +13,11 @@ # misc .DS_Store -.env .env.local -.env.development -.local +.env.development.local .env.test.local .env.production.local npm-debug.log* yarn-debug.log* yarn-error.log* - diff --git a/fitness-web/package-lock.json b/fitness-web/package-lock.json index 508ba0d..2151c09 100644 --- a/fitness-web/package-lock.json +++ b/fitness-web/package-lock.json @@ -1,35 +1,20 @@ { "name": "fitness-web", - "version": "1.0.0", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "fitness-web", - "version": "1.0.0", + "version": "0.1.0", "dependencies": { - "@react-oauth/google": "^0.12.1", - "@stomp/stompjs": "^7.0.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", - "axios": "^1.6.5", - "eslint-config-react-app": "^7.0.1", - "net": "^1.0.2", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-icons": "^5.0.1", - "react-kakao-maps": "^0.0.13", - "react-modal": "^3.16.1", - "react-router-dom": "^6.21.2", - "react-scripts": "^5.0.1", - "sockjs-client": "^1.6.1", - "stompjs": "^2.3.3", - "styled-components": "^6.1.8", + "react-scripts": "5.0.1", "web-vitals": "^2.1.4" - }, - "devDependencies": { - "@iconify/react": "^4.1.1" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -1977,18 +1962,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/runtime-corejs3": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.23.8.tgz", - "integrity": "sha512-2ZzmcDugdm0/YQKFVYsXiwUN7USPX8PM7cytpb4PFl87fM+qYPSvTZX//8tyeJB1j0YDmafBJEbl5f8NfLyuKw==", - "dependencies": { - "core-js-pure": "^3.30.2", - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/template": { "version": "7.22.15", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", @@ -2310,24 +2283,6 @@ "postcss-selector-parser": "^6.0.10" } }, - "node_modules/@emotion/is-prop-valid": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", - "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==", - "dependencies": { - "@emotion/memoize": "^0.8.1" - } - }, - "node_modules/@emotion/memoize": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", - "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" - }, - "node_modules/@emotion/unitless": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz", - "integrity": "sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==" - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -2451,27 +2406,6 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==" }, - "node_modules/@iconify/react": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@iconify/react/-/react-4.1.1.tgz", - "integrity": "sha512-jed14EjvKjee8mc0eoscGxlg7mSQRkwQG3iX3cPBCO7UlOjz0DtlvTqxqEcHUJGh+z1VJ31Yhu5B9PxfO0zbdg==", - "dev": true, - "dependencies": { - "@iconify/types": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/cyberalien" - }, - "peerDependencies": { - "react": ">=16" - } - }, - "node_modules/@iconify/types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", - "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==", - "dev": true - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -3418,23 +3352,6 @@ } } }, - "node_modules/@react-oauth/google": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/@react-oauth/google/-/google-0.12.1.tgz", - "integrity": "sha512-qagsy22t+7UdkYAiT5ZhfM4StXi9PPNvw0zuwNmabrWyMKddczMtBIOARflbaIj+wHiQjnMAsZmzsUYuXeyoSg==", - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, - "node_modules/@remix-run/router": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.14.2.tgz", - "integrity": "sha512-ACXpdMM9hmKZww21yEqWwiLws/UPLhNKvimN8RrYSqPSvB3ov7sLvAcfvaxePeLvccTQKGdkDIhLYApZVDFuKg==", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -3535,11 +3452,6 @@ "@sinonjs/commons": "^1.7.0" } }, - "node_modules/@stomp/stompjs": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@stomp/stompjs/-/stompjs-7.0.0.tgz", - "integrity": "sha512-fGdq4wPDnSV/KyOsjq4P+zLc8MFWC3lMmP5FBgLWKPJTYcuCbAIrnRGjB7q2jHZdYCOD5vxLuFoKIYLy5/u8Pw==" - }, "node_modules/@surma/rollup-plugin-off-main-thread": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz", @@ -4622,11 +4534,6 @@ "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==" }, - "node_modules/@types/stylis": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.0.tgz", - "integrity": "sha512-n4sx2bqL0mW1tvDf/loQ+aMX7GQD3lc3fkCMC55VFNDu/vBOabO+LTIeXKM14xK0ppk5TUGcWRjiSpIlUpghKw==" - }, "node_modules/@types/testing-library__jest-dom": { "version": "5.14.9", "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.9.tgz", @@ -5506,29 +5413,6 @@ "node": ">=4" } }, - "node_modules/axios": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", - "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", - "dependencies": { - "follow-redirects": "^1.15.4", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/axios/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/axobject-query": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", @@ -5752,21 +5636,6 @@ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "node_modules/babel-plugin-styled-components": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.1.4.tgz", - "integrity": "sha512-Xgp9g+A/cG47sUyRwwYxGM4bR/jDRg5N6it/8+HxCnbT5XNKSKDT9xm4oag/osgqjC2It/vH0yXsomOG6k558g==", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/plugin-syntax-jsx": "^7.22.5", - "lodash": "^4.17.21", - "picomatch": "^2.3.1" - }, - "peerDependencies": { - "styled-components": ">= 2" - } - }, "node_modules/babel-plugin-transform-react-remove-prop-types": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz", @@ -5832,27 +5701,6 @@ "babel-plugin-transform-react-remove-prop-types": "^0.4.24" } }, - "node_modules/babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", - "dependencies": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "node_modules/babel-runtime/node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", - "hasInstallScript": true - }, - "node_modules/babel-runtime/node_modules/regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -6037,19 +5885,6 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, - "node_modules/bufferutil": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", - "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, "node_modules/builtin-modules": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", @@ -6118,14 +5953,6 @@ "node": ">= 6" } }, - "node_modules/camelize": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", - "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/caniuse-api": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", @@ -6561,14 +6388,6 @@ "postcss": "^8.4" } }, - "node_modules/css-color-keywords": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", - "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==", - "engines": { - "node": ">=4" - } - }, "node_modules/css-declaration-sorter": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz", @@ -6750,16 +6569,6 @@ "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==" }, - "node_modules/css-to-react-native": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz", - "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==", - "dependencies": { - "camelize": "^1.0.0", - "css-color-keywords": "^1.0.0", - "postcss-value-parser": "^4.0.2" - } - }, "node_modules/css-tree": { "version": "1.0.0-alpha.37", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", @@ -6957,16 +6766,6 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, - "node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "optional": true, - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, "node_modules/damerau-levenshtein": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", @@ -7576,42 +7375,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "optional": true, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "optional": true, - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -8342,14 +8105,6 @@ "node": ">=0.8.x" } }, - "node_modules/eventsource": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-2.0.2.tgz", - "integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==", - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -8372,11 +8127,6 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/exenv": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", - "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==" - }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -8453,21 +8203,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "optional": true, - "dependencies": { - "type": "^2.7.2" - } - }, - "node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "optional": true - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -10125,11 +9860,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-what": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", - "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==" - }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -12672,19 +12402,6 @@ "node": ">= 4.0.0" } }, - "node_modules/memoize-one": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", - "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" - }, - "node_modules/merge-anything": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-2.4.4.tgz", - "integrity": "sha512-l5XlriUDJKQT12bH+rVhAHjwIuXWdAIecGwsYjv2LJo+dA1AeRTmeQS+3QBpO6lEthBMDi2IUMpLC1yyRvGlwQ==", - "dependencies": { - "is-what": "^3.3.1" - } - }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -12946,17 +12663,6 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, - "node_modules/net": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/net/-/net-1.0.2.tgz", - "integrity": "sha512-kbhcj2SVVR4caaVnGLJKmlk2+f+oLkjqdKeQlmUtz6nGzOpbcobwVIeSURNgraV/v3tlmGIX82OcPCl0K6RbHQ==" - }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "optional": true - }, "node_modules/no-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", @@ -12974,17 +12680,6 @@ "node": ">= 6.13.0" } }, - "node_modules/node-gyp-build": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", - "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", - "optional": true, - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -14917,11 +14612,6 @@ "node": ">= 0.10" } }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -15205,167 +14895,11 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz", "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" }, - "node_modules/react-icons": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.0.1.tgz", - "integrity": "sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==", - "peerDependencies": { - "react": "*" - } - }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, - "node_modules/react-kakao-maps": { - "version": "0.0.13", - "resolved": "https://registry.npmjs.org/react-kakao-maps/-/react-kakao-maps-0.0.13.tgz", - "integrity": "sha512-1ZHGbdvucFpq3rPSee1UB8cY/61QloQeH2Kh1SMSvIoL2kIUIo1lbF8FnwkHo3zrbpqcS4kIFPvvDB5xs27MdA==", - "dependencies": { - "@babel/runtime-corejs3": "^7.6.2", - "babel-runtime": "^6.26.0", - "react": "^16.9.0", - "react-dom": "^16.9.0", - "scriptjs": "^2.5.9", - "styled-components": "^4.3.2" - } - }, - "node_modules/react-kakao-maps/node_modules/@emotion/is-prop-valid": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", - "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", - "dependencies": { - "@emotion/memoize": "0.7.4" - } - }, - "node_modules/react-kakao-maps/node_modules/@emotion/memoize": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", - "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==" - }, - "node_modules/react-kakao-maps/node_modules/@emotion/unitless": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", - "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" - }, - "node_modules/react-kakao-maps/node_modules/css-to-react-native": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.3.2.tgz", - "integrity": "sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw==", - "dependencies": { - "camelize": "^1.0.0", - "css-color-keywords": "^1.0.0", - "postcss-value-parser": "^3.3.0" - } - }, - "node_modules/react-kakao-maps/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "node_modules/react-kakao-maps/node_modules/react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-kakao-maps/node_modules/react-dom": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", - "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - }, - "peerDependencies": { - "react": "^16.14.0" - } - }, - "node_modules/react-kakao-maps/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "node_modules/react-kakao-maps/node_modules/scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "node_modules/react-kakao-maps/node_modules/styled-components": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-4.4.1.tgz", - "integrity": "sha512-RNqj14kYzw++6Sr38n7197xG33ipEOktGElty4I70IKzQF1jzaD1U4xQ+Ny/i03UUhHlC5NWEO+d8olRCDji6g==", - "hasInstallScript": true, - "dependencies": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@emotion/is-prop-valid": "^0.8.1", - "@emotion/unitless": "^0.7.0", - "babel-plugin-styled-components": ">= 1", - "css-to-react-native": "^2.2.2", - "memoize-one": "^5.0.0", - "merge-anything": "^2.2.4", - "prop-types": "^15.5.4", - "react-is": "^16.6.0", - "stylis": "^3.5.0", - "stylis-rule-sheet": "^0.0.10", - "supports-color": "^5.5.0" - }, - "peerDependencies": { - "react": ">= 16.3.0", - "react-dom": ">= 16.3.0" - } - }, - "node_modules/react-kakao-maps/node_modules/stylis": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.4.tgz", - "integrity": "sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==" - }, - "node_modules/react-kakao-maps/node_modules/stylis-rule-sheet": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz", - "integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==", - "peerDependencies": { - "stylis": "^3.5.0" - } - }, - "node_modules/react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" - }, - "node_modules/react-modal": { - "version": "3.16.1", - "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz", - "integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==", - "dependencies": { - "exenv": "^1.2.0", - "prop-types": "^15.7.2", - "react-lifecycles-compat": "^3.0.0", - "warning": "^4.0.3" - }, - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "react": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18", - "react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18" - } - }, "node_modules/react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", @@ -15374,36 +14908,6 @@ "node": ">=0.10.0" } }, - "node_modules/react-router": { - "version": "6.21.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.21.2.tgz", - "integrity": "sha512-jJcgiwDsnaHIeC+IN7atO0XiSRCrOsQAHHbChtJxmgqG2IaYQXSnhqGb5vk2CU/wBQA12Zt+TkbuJjIn65gzbA==", - "dependencies": { - "@remix-run/router": "1.14.2" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "react": ">=16.8" - } - }, - "node_modules/react-router-dom": { - "version": "6.21.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.21.2.tgz", - "integrity": "sha512-tE13UukgUOh2/sqYr6jPzZTzmzc70aGRP4pAjG2if0IP3aUT+sBtAKUJh0qMh0zylJHGLmzS+XWVaON4UklHeg==", - "dependencies": { - "@remix-run/router": "1.14.2", - "react-router": "6.21.2" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" - } - }, "node_modules/react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", @@ -16042,11 +15546,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/scriptjs": { - "version": "2.5.9", - "resolved": "https://registry.npmjs.org/scriptjs/-/scriptjs-2.5.9.tgz", - "integrity": "sha512-qGVDoreyYiP1pkQnbnFAUIS5AjenNwwQBdl7zeos9etl+hYKWahjRTfzAZZYBv5xNHx7vNKCmaLDQZ6Fr2AEXg==" - }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -16259,11 +15758,6 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, - "node_modules/shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -16332,32 +15826,6 @@ "websocket-driver": "^0.7.4" } }, - "node_modules/sockjs-client": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.6.1.tgz", - "integrity": "sha512-2g0tjOR+fRs0amxENLi/q5TiJTqY+WXFOzb5UwXndlK6TO3U/mirZznpx6w34HVMoc3g7cY24yC/ZMIYnDlfkw==", - "dependencies": { - "debug": "^3.2.7", - "eventsource": "^2.0.2", - "faye-websocket": "^0.11.4", - "inherits": "^2.0.4", - "url-parse": "^1.5.10" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://tidelift.com/funding/github/npm/sockjs-client" - } - }, - "node_modules/sockjs-client/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dependencies": { - "ms": "^2.1.1" - } - }, "node_modules/source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", @@ -16586,14 +16054,6 @@ "node": ">= 0.8" } }, - "node_modules/stompjs": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/stompjs/-/stompjs-2.3.3.tgz", - "integrity": "sha512-5l/Ogz0DTFW7TrpHF0LAETGqM/so8UxNJvYZjJKqcX31EVprSQgnGkO80tZctPC/lFBDUrSFiTG3xd0R27XAIA==", - "optionalDependencies": { - "websocket": "latest" - } - }, "node_modules/stop-iteration-iterator": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", @@ -16825,70 +16285,6 @@ "webpack": "^5.0.0" } }, - "node_modules/styled-components": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.8.tgz", - "integrity": "sha512-PQ6Dn+QxlWyEGCKDS71NGsXoVLKfE1c3vApkvDYS5KAK+V8fNWGhbSUEo9Gg2iaID2tjLXegEW3bZDUGpofRWw==", - "dependencies": { - "@emotion/is-prop-valid": "1.2.1", - "@emotion/unitless": "0.8.0", - "@types/stylis": "4.2.0", - "css-to-react-native": "3.2.0", - "csstype": "3.1.2", - "postcss": "8.4.31", - "shallowequal": "1.1.0", - "stylis": "4.3.1", - "tslib": "2.5.0" - }, - "engines": { - "node": ">= 16" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/styled-components" - }, - "peerDependencies": { - "react": ">= 16.8.0", - "react-dom": ">= 16.8.0" - } - }, - "node_modules/styled-components/node_modules/csstype": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", - "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" - }, - "node_modules/styled-components/node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/styled-components/node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" - }, "node_modules/stylehacks": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz", @@ -16904,11 +16300,6 @@ "postcss": "^8.2.15" } }, - "node_modules/stylis": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.1.tgz", - "integrity": "sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==" - }, "node_modules/sucrase": { "version": "3.35.0", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", @@ -17450,12 +16841,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", - "optional": true - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -17727,19 +17112,6 @@ "requires-port": "^1.0.0" } }, - "node_modules/utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -17834,14 +17206,6 @@ "makeerror": "1.0.12" } }, - "node_modules/warning": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", - "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", - "dependencies": { - "loose-envify": "^1.0.0" - } - }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", @@ -18182,23 +17546,6 @@ "node": ">=4.0" } }, - "node_modules/websocket": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", - "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", - "optional": true, - "dependencies": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", @@ -18220,21 +17567,6 @@ "node": ">=0.8.0" } }, - "node_modules/websocket/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "optional": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/websocket/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "optional": true - }, "node_modules/whatwg-encoding": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", @@ -18813,15 +18145,6 @@ "node": ">=10" } }, - "node_modules/yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", - "optional": true, - "engines": { - "node": ">=0.10.32" - } - }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", diff --git a/fitness-web/package.json b/fitness-web/package.json index da14a0e..d210697 100644 --- a/fitness-web/package.json +++ b/fitness-web/package.json @@ -1,26 +1,14 @@ { "name": "fitness-web", - "version": "1.0.0", + "version": "0.1.0", "private": true, "dependencies": { - "@react-oauth/google": "^0.12.1", - "@stomp/stompjs": "^7.0.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", - "axios": "^1.6.5", - "eslint-config-react-app": "^7.0.1", - "net": "^1.0.2", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-icons": "^5.0.1", - "react-kakao-maps": "^0.0.13", - "react-modal": "^3.16.1", - "react-router-dom": "^6.21.2", - "react-scripts": "^5.0.1", - "sockjs-client": "^1.6.1", - "stompjs": "^2.3.3", - "styled-components": "^6.1.8", + "react-scripts": "5.0.1", "web-vitals": "^2.1.4" }, "scripts": { @@ -46,8 +34,5 @@ "last 1 firefox version", "last 1 safari version" ] - }, - "devDependencies": { - "@iconify/react": "^4.1.1" } } diff --git a/fitness-web/public/index.html b/fitness-web/public/index.html index 99e83fb..aa069f2 100644 --- a/fitness-web/public/index.html +++ b/fitness-web/public/index.html @@ -10,15 +10,34 @@ content="Web site created using create-react-app" /> - React App - - - - + + + + React App
+ diff --git a/fitness-web/src/App.css b/fitness-web/src/App.css index e69de29..74b5e05 100644 --- a/fitness-web/src/App.css +++ b/fitness-web/src/App.css @@ -0,0 +1,38 @@ +.App { + text-align: center; +} + +.App-logo { + height: 40vmin; + pointer-events: none; +} + +@media (prefers-reduced-motion: no-preference) { + .App-logo { + animation: App-logo-spin infinite 20s linear; + } +} + +.App-header { + background-color: #282c34; + min-height: 100vh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: calc(10px + 2vmin); + color: white; +} + +.App-link { + color: #61dafb; +} + +@keyframes App-logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} diff --git a/fitness-web/src/App.js b/fitness-web/src/App.js index faa3df1..3784575 100644 --- a/fitness-web/src/App.js +++ b/fitness-web/src/App.js @@ -1,65 +1,25 @@ -import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; +import logo from './logo.svg'; import './App.css'; -import MyPageCoach from './pages/MyPageCoach.jsx'; -import MyPageMember from './pages/MyPageMember.jsx'; -import RegistrationCoach from './pages/RegistrationCoach.jsx'; -import RegistrationMember from './pages/RegistrationMember.jsx'; -import ModifyingCoach from './pages/ModifyingCoach.jsx'; -import ModifyingMember from './pages/ModifyingMember.jsx'; -import MainHeader from "./components/header/Header.jsx"; -import Profile from './pages/Profile.jsx'; -import LookReviews from './pages/LookReviews.jsx'; -import Photos from './pages/Photos.jsx'; -import SearchPage from './pages/SearchPage'; -import Main from './pages/Main'; -import Reviews from './pages/Reviews.js'; -import MyCoaches from './pages/MyCoaches.js'; -import Favorites from './pages/Favorites.js'; -import ReviewList from './pages/ReviewList.js'; -import GetReviewList from './pages/GetReviewList.js'; -import MyMembers from './pages/MyMembers.js'; -import BottomHeader from './components/header/BottomHeader.jsx'; -import ChatingList from './pages/ChatingList.jsx'; -import ChattingListCoach from './pages/ChattingListCoach.jsx'; -import ReviewDetail from './pages/ReviewDetail.jsx'; -import RegistChoice from './pages/RegistChoice.jsx'; -import Require from "./pages/Require.jsx" function App() { return ( -
- - -
- - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - }/> - } /> - } /> - } /> - } /> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - -
- -
+
+
+ logo +

+ Edit src/App.js and save to reload. +

+ + Learn React + +
); } -export default App; \ No newline at end of file +export default App; diff --git a/fitness-web/src/components/CommonStyle.css b/fitness-web/src/components/CommonStyle.css deleted file mode 100644 index d3e3ed4..0000000 --- a/fitness-web/src/components/CommonStyle.css +++ /dev/null @@ -1,74 +0,0 @@ -/* 중복된 스타일 */ - -.userList ul { - list-style: none; - display: flex; - flex-direction: column; - align-items: center; - overflow: auto; - } - - .userList li { - display: flex; - align-items: center; - background-color: #FFE0CA; - border-radius: 3px; - width: 55%; - height: 120px; - font-size: 20px; - padding: 10px; - margin: 30px; - color: #643E23; - cursor: pointer; - } - - .userList li p { - text-align: left; - padding-left: 50px; - } - - .profileImage { - width: 90px; - height: 90px; - border-radius: 50%; - display: flex; - margin-left: 30px; -} - -.info { - flex-direction: column; - flex: 1; -} - -.detail { - font-weight: bold; -} - -.titleAndBack { - margin-top: 10px; - display: flex; - justify-content: space-around; - font-size: 13px; -} - -.titleAndBack h2 { - text-align: left; - padding: 30px; - color: #FF9549; -} - -.backBtn { - border-color: #FF9549; - background-color: white; - color: #FF9549; - font-weight: bold; - border-radius: 10px; - width: 106px; - height: 46px; - font-size: 18px; - margin-top: 40px; - cursor: pointer; - font-size: 15px; - margin-left: 20px; - z-index: 1; /* 버튼을 reviewTextarea 위에 위치시키도록 함 */ -} \ No newline at end of file diff --git a/fitness-web/src/components/ImageUtils.css b/fitness-web/src/components/ImageUtils.css deleted file mode 100644 index 80fbe39..0000000 --- a/fitness-web/src/components/ImageUtils.css +++ /dev/null @@ -1,46 +0,0 @@ - #inputImage { - visibility: hidden; - } - - .add-button { - color: white; - border-radius: 15px; - border: none; - width: 830px; - height: 40px; - font-size: 17px; - background-color: #643E23; - cursor: pointer; - display: block; - margin: auto; - padding-top: 20px; - margin-bottom: 10px; - } - - .image-gallery { - display: flex; - flex-wrap: wrap; - display: flex; - align-items: center; - justify-content: center; - } - - .image-container { - margin: 5px; - position: relative; - cursor: pointer; - - img { - margin: 5px; - width: 80px; - height: 80px; - cursor: pointer; - border-radius:5px; - border: 3px dashed #cccccc; - } - } - - .imgIcon{ - width: 35px; - height: 35px; - } \ No newline at end of file diff --git a/fitness-web/src/components/ImageUtils.js b/fitness-web/src/components/ImageUtils.js deleted file mode 100644 index b7fc123..0000000 --- a/fitness-web/src/components/ImageUtils.js +++ /dev/null @@ -1,83 +0,0 @@ -import {useState} from "react"; -import './ImageUtils.css'; -import { Icon } from "@iconify/react"; - -// 이미지 처리 -const ImageUtils = ({onImageSelected}) => { - const [showImages, setShowImages] = useState([]); - - const handleAddImages = async (event) => { - const imageLists = event.target.files; - let imageUrlLists = [...showImages]; - - try { - for (let i = 0; i < imageLists.length; i++) { - const currentImage = imageLists[i]; - imageUrlLists.push(currentImage); - } - - // 최대 6개로 제한 - imageUrlLists = imageUrlLists.slice(0, 6); - setShowImages(imageUrlLists); - onImageSelected(imageUrlLists); - - console.log('Selected Images:', imageUrlLists); - - } catch (error) { - console.error("이미지 업로드 중 오류 발생: ", error); - } -}; - - const handleDeleteImage = (id) => { - setShowImages((prevImages) => - prevImages.filter((_, index) => index !== id)); - }; - - const emptyImageStyle = { // 기본 이미지 스타일 - width: '90px', - height: '90px', - border: '3px dashed #cccccc', - margin: '15px', - borderRadius: '5px', - color: '#919191', - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - }; - - return ( -
-
- {[...Array(6)].map((_, id) => ( -
handleDeleteImage(id)}> - {showImages[id] ? ( - - {`${showImages[id].name}-${id}`} - - ) : ( -
- -
- )} -
- ))} -
-
- - -
-
- -); -}; - -export default ImageUtils; \ No newline at end of file diff --git a/fitness-web/src/components/Loading/Loading.css b/fitness-web/src/components/Loading/Loading.css deleted file mode 100644 index b69631f..0000000 --- a/fitness-web/src/components/Loading/Loading.css +++ /dev/null @@ -1,23 +0,0 @@ -/* Loading.css */ - -.loading-spinner-container { - display: flex; - justify-content: center; - align-items: center; - height: 100%; /* 화면의 중앙에 정렬하기 위해 */ - } - - .loading-spinner { - border: 4px solid rgba(0, 0, 0, 0.1); - border-left-color: #09f; - border-radius: 50%; - width: 50px; - height: 50px; - animation: spin 1s linear infinite; /* 회전 애니메이션 */ - } - - @keyframes spin { - to { - transform: rotate(360deg); - } - } \ No newline at end of file diff --git a/fitness-web/src/components/Loading/Loading.jsx b/fitness-web/src/components/Loading/Loading.jsx deleted file mode 100644 index adee8fe..0000000 --- a/fitness-web/src/components/Loading/Loading.jsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; -import './Loading.css'; // 로딩 스피너의 스타일시트 import - -const Loading = () => { - return ( -
-
-
- ); -}; - -export default Loading; \ No newline at end of file diff --git a/fitness-web/src/components/brosearch/ListSection.css b/fitness-web/src/components/brosearch/ListSection.css deleted file mode 100644 index 7640546..0000000 --- a/fitness-web/src/components/brosearch/ListSection.css +++ /dev/null @@ -1,112 +0,0 @@ -.UserProfile { - - display: flex; - align-items: center; - - border-radius: 15px; - background-color: white; - padding: 10px; - width : 375px; - height : 60px; - margin-top: 10px; -} -.ListContainer { - display: flex; - background-color: #643E23; - width: 390px; - height: 445px; - flex-direction: column; - align-items: center; - max-height: 445px; /* 최대 높이 설정, 원하는 값으로 조절하세요 */ - overflow-y: auto; - padding: 15px; - overflow-x: hidden; -} -.UserPic { - width : 49px; - height : 49px; - background-color: rgb(197, 197, 197); - border-radius: 50%; - align-items: center; - justify-content: center; - display: flex; - -} -.UserPicIcon{ - width : 30px; - height : 30px; - color: gray; - -} -.Userinfo{ - color: #643E23; - font-weight: 700; - margin-left: 10%; -} - -.UserProfile:hover { - background-color: #ff9549; /* 마우스 오버 시 배경색 변경 */ - color: #fff ; -} - -.UserProfile:hover .StarIcon { - color: white; /* 마우스 오버 시 별 아이콘 색 변경 */ -} - - -.ListContainer::-webkit-scrollbar { - width: 5px; /* 스크롤 바의 너비 설정 */ -} - -.ListContainer::-webkit-scrollbar-thumb { - background-color: #ff9549; /* 스크롤 바의 색상 설정 */ - border-radius: 5px; /* 둥근 형태로 만들기 */ - height: 10px; /* 스크롤 바의 높이 설정 */ -} - -.ListContainer::-webkit-scrollbar-track { - background-color: #643E23; /* 스크롤 바 트랙의 색상 설정 */ -} - -table{ - width: 250px; -} - -.listId{ - - - - .ListContainer::-webkit-scrollbar { - width: 5px; /* 스크롤 바의 너비 설정 */ - } - - .ListContainer::-webkit-scrollbar-thumb { - background-color: #ff9549; /* 스크롤 바의 색상 설정 */ - border-radius: 5px; /* 둥근 형태로 만들기 */ - height: 10px; /* 스크롤 바의 높이 설정 */ - } - - .ListContainer::-webkit-scrollbar-track { - background-color: #643E23; /* 스크롤 바 트랙의 색상 설정 */ - } - - table{ - width: 250px; - } - - .listId{ - - text-align: center; - border-right: 1px solid black; - - } - - .lastTd { - border-right: none; - } - - .UserProfile.clicked { - background-color: #ff9549; /* 선택된 유저 프로필의 배경색을 변경합니다. */ - color: #fff; /* 선택된 유저 프로필의 텍스트 색상을 변경합니다. */ - } -} \ No newline at end of file diff --git a/fitness-web/src/components/brosearch/ListSection.jsx b/fitness-web/src/components/brosearch/ListSection.jsx deleted file mode 100644 index 241d809..0000000 --- a/fitness-web/src/components/brosearch/ListSection.jsx +++ /dev/null @@ -1,100 +0,0 @@ -import React from "react"; -import { useNavigate } from "react-router-dom"; -import "./ListSection.css"; -import { FaStar } from "react-icons/fa"; -import { Icon } from "@iconify/react"; -const StarIcon = () => { - return ; -}; - -const ListSection = ({ - userList, - selectedRegion, - selectedSubAddress, - selectedUserId, -}) => { - // userList가 배열이 아니라면 빈 배열을 반환 - const users = Array.isArray(userList) ? userList : []; - - // 전체 유저 리스트 또는 선택한 지역의 유저 리스트를 생성 - const filteredList = users.filter((user) => { - const regionMatch = !selectedRegion || user.region === selectedRegion; - const subAddressMatch = - !selectedSubAddress || user.subAddress === selectedSubAddress; - return regionMatch && subAddressMatch; - }); - - const navigate = useNavigate(); - - const handleProfileClick = (userId) => { - // 클릭된 프로필의 userId를 사용하여 프로필 페이지로 이동 - console.log(userId); - navigate("/profile", { state: { coachId: userId } }); - }; - - return ( -
-
- 동네형 리스트 -
-
- {filteredList.map((user) => ( -
handleProfileClick(user.coachId)} - > -
- - {user.coachPicture ? ( - 프로필 사진 - ) : ( -
- -
- )}
-
- - - - - - - - -
{user.nickname}{user.age}세 -   {user.rating} -
-
-
- ))} -
-
- ); -}; - -export default ListSection; - - diff --git a/fitness-web/src/components/brosearch/MapSection.jsx b/fitness-web/src/components/brosearch/MapSection.jsx deleted file mode 100644 index 0acdd78..0000000 --- a/fitness-web/src/components/brosearch/MapSection.jsx +++ /dev/null @@ -1,106 +0,0 @@ -// MapSection.js -import React, { useEffect, useRef } from 'react'; -import mapmarker from '../../img/mapmarker.svg'; -import mapmarkerSelected from '../../img/mapmarkerSelected.svg'; - -const { kakao } = window; - -const MapSection = ({ userList, onMarkerClick }) => { - const mapContainer = useRef(null); - const mapInstance = useRef(null); - const markers = useRef([]); - const selectedMarker = useRef(null); - - useEffect(() => { - if (!userList || userList.length === 0) { - return; - } - - if (!mapInstance.current) { - kakao.maps.load(() => { - const container = mapContainer.current; - const options = { - center: new kakao.maps.LatLng(37.4966645, 127.0629804), - level: 10, - }; - - const map = new kakao.maps.Map(container, options); - - - markers.current.forEach(marker => marker.setMap(null)); - markers.current = []; - selectedMarker.current = null; - - const geocoder = new kakao.maps.services.Geocoder(); - - userList.forEach((user) => { - const address = user.region + ' ' + user.subAddress + ' ' + user.detailAddress; - - - geocoder.addressSearch(address, (result, status) => { - if (status === kakao.maps.services.Status.OK) { - const coords = new kakao.maps.LatLng(result[0].y, result[0].x); - - const markerImage = new kakao.maps.MarkerImage( - mapmarker, - new kakao.maps.Size(54, 54), - { offset: new kakao.maps.Point(27, 54) } - ); - - const markerImageSelected = new kakao.maps.MarkerImage( - mapmarkerSelected, - new kakao.maps.Size(46, 46), - { offset: new kakao.maps.Point(27, 54) } - ); - - const marker = new kakao.maps.Marker({ - position: coords, - image: markerImage, - }); - - kakao.maps.event.addListener(marker, 'click', function () { - if (onMarkerClick) { - if (selectedMarker.current && selectedMarker.current !== marker) { - selectedMarker.current.setImage(markerImage); - } - - onMarkerClick(user.coachId); - if (selectedMarker.current === marker) { - selectedMarker.current.setImage(markerImage); - selectedMarker.current = null; - } else { - marker.setImage(markerImageSelected); - selectedMarker.current = marker; - - } - } - }); - - marker.setMap(map); - markers.current.push(marker); - map.setCenter(coords); - } else { - console.log('주소를 찾을 수 없습니다.'); - } - }); - }); - - mapInstance.current = map; - }); - } - }, [userList, onMarkerClick]); - - return ( -
- ); -}; - -export default MapSection; \ No newline at end of file diff --git a/fitness-web/src/components/brosearch/SearchSection.css b/fitness-web/src/components/brosearch/SearchSection.css deleted file mode 100644 index 63dad29..0000000 --- a/fitness-web/src/components/brosearch/SearchSection.css +++ /dev/null @@ -1,200 +0,0 @@ -/*SearchSection.css*/ - -.Search { - display: flex; - flex-direction: column; /* 세로로 정렬 */ - align-items: center; /* 가운데 정렬 */ - width: 420px; - height: 200px; -} - -.InputRegion { - width: 385px; - height: 25px; - position: relative; - background-color: #ff9549; - padding-top: 12px; - padding-left: 10px; - padding-right: 19px; - padding-bottom: 30px; - -} -.search-section { - width: 400px; - padding: 7px; - background-color: #643E23; - font-weight: 600; - color: #ff9549; - display: flex; - justify-content: center; - -} -/* 나머지 코드는 그대로 유지 */ - - -.main-address { - width: 50%; - display: flex; - justify-content: center; - background-color: #ffffff; - max-height: 150px; /* 최대 높이 설정, 원하는 값으로 조절하세요 */ - overflow-y: auto; -} - -.sub-address { - width: 50%; - display: flex; - justify-content: center; - background-color: #fff; - max-height: 150px; /* 최대 높이 설정, 원하는 값으로 조절하세요 */ - overflow-y: auto; -} - -ul { - list-style: none; - padding: 0; - margin: 0; - width: 100%; -} - -.main-address li{ - cursor: pointer; - padding: 8px; - border: none; - margin-bottom: 5px; - display: flex; - justify-content: center; - -}.sub-address li { - cursor: pointer; - padding: 8px; - border: none; - margin-bottom: 5px; - display: flex; - justify-content: center; -} - -.main-address li:hover{ - background-color: #643E23; - color: #ff9549; -} -.sub-address li:hover { - background-color: #643E23; - color: #ff9549; -} - -.selected { - background-color: #643E23; - color: #ff9549; -} - -.main-address li:hover, -.main-address .selected { - background-color: #643E23; - color: #ff9549; -} - -.main-address .sub-address::-webkit-scrollbar { - width: 5px; /* 스크롤 바의 너비 설정 */ -} - -.main-address .sub-address::-webkit-scrollbar-thumb { - background-color: #ff9549; /* 스크롤 바의 색상 설정 */ - border-radius: 5px; /* 둥근 형태로 만들기 */ - height: 10px; /* 스크롤 바의 높이 설정 */ -} - -.main-address .sub-address::-webkit-scrollbar-track { - background-color: #643E23; /* 스크롤 바 트랙의 색상 설정 */ -} - -.search-section { -width: 400px; -padding: 7px; -background-color: #643E23; -font-weight: 600; -color: #ff9549; -display: flex; -justify-content: center; - -} -/* 나머지 코드는 그대로 유지 */ - - -.main-address { -width: 50%; -display: flex; -justify-content: center; -background-color: #ffffff; -max-height: 150px; /* 최대 높이 설정, 원하는 값으로 조절하세요 */ -overflow-y: auto; -} - -.sub-address { -width: 50%; -display: flex; -justify-content: center; -background-color: #fff; -max-height: 150px; /* 최대 높이 설정, 원하는 값으로 조절하세요 */ -overflow-y: auto; -} - -ul { -list-style: none; -padding: 0; -margin: 0; -width: 100%; -} - - -.main-address li{ -cursor: pointer; -padding: 8px; -border: none; -margin-bottom: 5px; -display: flex; -justify-content: center; - -}.sub-address li { - -cursor: pointer; -padding: 8px; -border: none; -margin-bottom: 5px; -display: flex; -justify-content: center; -} - -.main-address li:hover{ -background-color: #643E23; -color: #ff9549; -} -.sub-address li:hover { -background-color: #643E23; -color: #ff9549; -} -*/ -.selected { -background-color: #643E23; -color: #ff9549; -} - -.main-address li:hover, -.main-address .selected { -background-color: #643E23; -color: #ff9549; -} - -.sub-address::-webkit-scrollbar { -width: 5px; /* 스크롤 바의 너비 설정 */ -} - -.sub-address::-webkit-scrollbar-thumb { -background-color: #ff9549; /* 스크롤 바의 색상 설정 */ -border-radius: 5px; /* 둥근 형태로 만들기 */ -height: 10px; /* 스크롤 바의 높이 설정 */ -} - -.main-address .sub-address::-webkit-scrollbar-track { -background-color: #643E23; /* 스크롤 바 트랙의 색상 설정 */ -} \ No newline at end of file diff --git a/fitness-web/src/components/brosearch/SearchSection.jsx b/fitness-web/src/components/brosearch/SearchSection.jsx deleted file mode 100644 index ad47071..0000000 --- a/fitness-web/src/components/brosearch/SearchSection.jsx +++ /dev/null @@ -1,117 +0,0 @@ -// SearchSection.js -import React, { useState } from 'react'; -import './SearchSection.css'; -import { FaSearch } from 'react-icons/fa'; - -const SearchSection = ({ onRegionSelect, userList }) => { - const [selectedRegion, setSelectedRegion] = useState(null); - const [selectedSubAddress, setSelectedSubAddress] = useState(null); - const [searchKeyword, setSearchKeyword] = useState(''); - - const handleRegionSelect = (region, subAddress = null) => { - setSelectedRegion(region); - setSelectedSubAddress(subAddress); - - // 새로운 지역이 선택되었을 때, 상위 컴포넌트로 선택한 지역 정보 전달 - onRegionSelect(region, subAddress); - }; - - const handleKeyDown = (e) => { - if (e.key === 'Enter') { - // 엔터를 누르면 검색어로 지역 선택 - handleRegionSearch(searchKeyword); - } - }; - - const handleRegionSearch = (searchKeyword) => { - const matchedRegion = regions.find((region) => - region.toLowerCase().includes(searchKeyword.toLowerCase()) - ); - - if (matchedRegion) { - setSelectedRegion(matchedRegion); - setSelectedSubAddress(null); - - // 검색어로 지역이 선택되었을 때, 상위 컴포넌트로 선택한 지역 정보 전달 - onRegionSelect(matchedRegion, null); - } else { - // 검색 결과가 없을 때 전체 지역 선택으로 처리 - console.log(`No matching region found for ${searchKeyword}`); - setSelectedRegion(null); - setSelectedSubAddress(null); - - // 검색 결과가 없을 때, 상위 컴포넌트로 선택한 지역 정보 전달 (전체 지역 선택) - onRegionSelect(null, null); - } - }; - - const regions = ['서울특별시', '부산광역시', '대구광역시', '인천광역시', '광주광역시', '대전광역시', '울산광역시', '세종특별자치시', '경기도']; - - const subAddresses = { - 서울특별시: ['강남구', '강동구', '강북구', '강서구', '관악구', '광진구', '구로구', '금천구', '노원구', '도봉구', '동대문구', '동작구', '마포구', '서대문구', '서초구', '성동구', '성북구', '송파구', '양천구', '영등포구', '용산구', '은평구', '종로구', '중구', '중랑구'], - 부산광역시: ['중구', '서구', '동구', '영도구', '부산진구', '동래구', '남구', '북구', '해운대구', '사하구', '금정구', '강서구', '연제구', '수영구', '사상구', '기장군'], - 대구광역시: ['중구', '동구', '서구', '남구', '북구', '수성구', '달서구', '달성군'], - 인천광역시: ['중구', '동구', '남구', '연수구', '남동구', '부평구', '계양구', '서구', '강화군', '옹진군'], - 광주광역시: ['동구', '서구', '남구', '북구', '광산구'], - 대전광역시: ['동구', '중구', '서구', '유성구', '대덕구'], - 울산광역시: ['중구', '남구', '동구', '북구', '울주군'], - 세종특별자치시: ['세종특별자치시'], - 경기도: ['수원시', '성남시', '안양시', '안산시', '용인시', '부천시', '광명시', '평택시', '동두천시', '안성시', '광주시', '이천시', '양주시', '의정부시', '여주시', '화성시', '포천시', '연천군', '가평군', '양평군'], - } - return ( -
-
전체 지역 검색
-
-
- setSearchKeyword(e.target.value)} - onKeyDown={handleKeyDown} - /> - -
-
-
-
    - {regions.map((region) => ( -
  • handleRegionSelect(region)} - className={selectedRegion === region ? 'selected' : ''} - > - {region} -
  • - ))} -
-
-
- {selectedRegion && subAddresses[selectedRegion] && ( -
    -
  • handleRegionSelect(selectedRegion)} - className={selectedSubAddress === null ? 'selected' : ''} - > - 전체 -
  • - {subAddresses[selectedRegion].map((subAddress) => ( -
  • handleRegionSelect(selectedRegion, subAddress)} - className={selectedSubAddress === subAddress ? 'selected' : ''} - > - {subAddress} -
  • - ))} -
- )} -
-
-
-
- ); -}; - -export default SearchSection; \ No newline at end of file diff --git a/fitness-web/src/components/chatroom/ChatRoom.css b/fitness-web/src/components/chatroom/ChatRoom.css deleted file mode 100644 index d9d54b5..0000000 --- a/fitness-web/src/components/chatroom/ChatRoom.css +++ /dev/null @@ -1,262 +0,0 @@ -.modal{ - /* 초기에는 모달을 숨깁니다. */ - position: fixed; - z-index: 1; - left: 0; - top: 0; - width: 100%; - height: 100%; - overflow: auto; - - padding-top: 60px; - } - .modal-content { - margin: 5% auto; /* 모달이 화면 중앙에 위치하도록 조정합니다. */ - padding-top:3%; - - width: 400px; - height: 500px; /* 모달의 너비를 조정합니다. */ - border-radius: 30px; - background-color: #FF9549; - /*position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - padding: 40px 0px; - /*z-index: 1;*/ - /*user-select: none; - width: 400px; - height: 500px; - border-radius: 30px; - background-color: #FF9549;*/ - - } - - .modal-content .modalClose { - cursor: pointer; - position: absolute; - top: 10px; - left: 10px; - font-size: 20px; - } - .modalClose - { - color: white; - } - 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; - } - - input { - padding: 10px; - font-size: 1.2em; - } - - .container{ - position: relative; - } - - .register{ - position: fixed; - padding:30px; - top:35%; - left:32%; - display: flex; - flex-direction: row; - } - .chat-box{ - - margin:80px 150px; - height: 600px; - padding: 10px; - display: flex; - flex-direction: row; - border-radius: 10px; - - } - - .member-list{ - width: 100%; - } - - .chat-content{ - height:70%; - width:100%; - - } - .chat-messages::-webkit-scrollbar { - width: 5px; /* 스크롤 바의 너비 설정 */ - } - - .chat-messages::-webkit-scrollbar-thumb { - background-color: #ff9549; /* 스크롤 바의 색상 설정 */ - border-radius: 5px; /* 둥근 형태로 만들기 */ - height: 10px; /* 스크롤 바의 높이 설정 */ - } - - .chat-messages{ - height: 100%; - width: 100%; - overflow: auto; - background-color: #FFE8D8; - - } - - .send-message{ - height:13%; - width: 100%; - display: flex; - flex-direction: row; - } - - .input-message{ - width:90%; - height: 50px; - border-radius: 10px; - border-style: none; - margin-left: 12px; - margin-top: 10px; - } - - ul { - padding: 0px; - list-style-type: none; - - - } - li.message{ - width: 90%; - } - .send-button{ - border: none; - padding: 10px; - background: #FFD6B9; - color:#FF9549; - font-size: 1.2em; - font-weight: bold; - width:100px; - height: 50px; - border-radius: 50px; - margin-top: 20px; - margin-left: 5px; - margin-right: 5px; - cursor: pointer; - } - .member{ - padding: 10px; - - border:#000; - cursor: pointer; - margin: 5px 2px; - - } - .member.active{ - background-color: #FFE0CA; - color: #643E23; - } - .member:hover{ - background-color: #FFE0CA; - color: #643E23; - } - - - .avatar.self{ - color:#000; - - - } - .message{ - padding:5px; - width: 200px; - display: flex; - flex-direction: row; - margin: 5px 10px; - align-items: flex-end; - text-align: left; - - - } - .message-data{ - padding:5px; - color: #643E23; - - - } - .message.self{ - justify-content: end; - margin-right:0px; - } - .message-box { - - padding: 10px; - display: inline-block; - max-width: 100%; /* 최대 너비를 조절할 수 있습니다. */ - word-wrap: break-word; - margin-bottom: 0px; - - } - - .message.self .message-box { - background-color: #FF9549; - border-radius: 20px 20px 0px 20px; - /* 본인 메시지의 배경색 */ - } - - .message .message-box { - /* 메시지의 배경색 */ - background-color: #FFFFFF; - border-radius: 20px 20px 20px 0px; - } - - - .modal-header ul{ - display: flex; - justify-content: space-between ; - margin-left: 5%; - margin-right:5% - } - .request-btn{ - margin-right: 30px; - color:#FF9549; - border-radius: 15px; - width: 100px; - height: 35px; - font-size: 13px; - border: none; - background-color: #FFFFFF; - box-shadow: 0px 8px 6px -6px #643E23; - cursor: pointer; - font-weight: 700; - - } - .receiver-name{ - font-weight: 700; - padding-top: 17px; - margin-bottom: 15px; - padding-bottom: 0px; - color: #FFFFFF; - } - .chatRoomgprofile{ - background-size: contain; - width: 40px; - height: 40px; - border-radius: 100px; - color: #643E23; - align-items: center; - justify-content: center; - display: flex; - } - .chatRoomIcon{ - width: 20px; - height: 20px; - } \ No newline at end of file diff --git a/fitness-web/src/components/chatroom/ChatRoom.js b/fitness-web/src/components/chatroom/ChatRoom.js deleted file mode 100644 index 6f34837..0000000 --- a/fitness-web/src/components/chatroom/ChatRoom.js +++ /dev/null @@ -1,237 +0,0 @@ -import './ChatRoom.css'; -import { over } from 'stompjs'; -import SockJS from 'sockjs-client'; -import React, { useEffect, useState, useRef } from 'react'; -import axios from "axios"; -import { Icon } from "@iconify/react"; - -let stompClient = null; - -const ChatRoom = ({ isOpen, onClose, tab, userData, initialChats, setUserData }) => { - const [privateChats, setPrivateChats] = useState(new Map()); - const [dragStart, setDragStart] = useState({ x: 0, y: 0 }); - const [position, setPosition] = useState({ x: 0, y: 0 }); - const [isDragging, setIsDragging] = useState(false); - const apiUrl = process.env.REACT_APP_API_URL; - const chatContentRef = useRef(null); - - const token=localStorage.getItem("token"); - const userId = Number(localStorage.getItem("userId")); - useEffect(() => { - let Sock = new SockJS(`${apiUrl}/stomp/chat`); - stompClient = over(Sock); - stompClient.connect({}, onConnected, onError); - - return () => { - Sock.close(); - }; - }, []); - - useEffect(() => { - if (stompClient && tab !== "CHATROOM") { - stompClient.subscribe(`/user/${tab}/private`, onPrivateMessage); - } - }, [tab]); - - useEffect(() => { - // 새 채팅이 추가될 때마다 스크롤을 아래로 이동 - if (chatContentRef.current) { - chatContentRef.current.scrollTop = chatContentRef.current.scrollHeight; - } - }, [privateChats, tab]); - - const onConnected = () => { - setUserData({ ...userData, connected: true }); - stompClient.subscribe(`/user/${tab}/private`, onPrivateMessage); - }; - - const onError = (err) => { - console.log(err); - }; - - const onPrivateMessage = (payload) => { - console.log(payload); - var payloadData = JSON.parse(payload.body); - - if (privateChats.get(payloadData.chatRoomId)) { - privateChats.get(payloadData.chatRoomId).push(payloadData); - setPrivateChats(new Map(privateChats)); - } else { - privateChats.set(payloadData.chatRoomId, []); - setPrivateChats(new Map(privateChats)); - } - }; - - useEffect(() => { - axios.get(`${apiUrl}/members/chatrooms`, { - headers: { - 'token': token - } - }) - .then(response => { - const responseData = response.data; - console.log("API 응답:", responseData); - - if (responseData.isSuccess) { - const { result } = responseData; - const updatedChats = new Map(initialChats); // initialChats로 초기화 - result.forEach(chat => { - updatedChats.set(chat.chatRoomId, []); // 해당 채팅방의 채팅 정보 가져오기 - }); - console.log("초기 채팅 정보:", updatedChats); - setPrivateChats(updatedChats); // privateChats 상태 업데이트 - } else { - console.log("API 요청 실패:", responseData.message); - } - }) - .catch(error => { - console.error("API 요청 중 오류 발생", error); - console.error("에러 상세보기", error.response); - }); - }, [userData.memberId, initialChats]); - - const handleMessage = (event) => { - const { value } = event.target; - setUserData({ ...userData, "message": value }); - } - - const sendPrivateValue = async () => { - if (stompClient) { - const chatMessage = { - chatRoomId: tab, - sender: userData.username, - message: userData.message, - userId:initialChats.get(tab).userId, - }; - const updatedPrivateChats = new Map(privateChats); - const chatMessages = [...updatedPrivateChats.get(tab), chatMessage]; // Create a new array with the new message - updatedPrivateChats.set(tab, chatMessages); // Update the map with the new array - - setPrivateChats(updatedPrivateChats); // Update the state with the new map - stompClient.send("/pub/send", {}, JSON.stringify(chatMessage)); - setUserData({ ...userData, "message": "" }); - } - }; - - const handleOnKeyPress = (e) => { - if (e.key === 'Enter') { - sendPrivateValue(); - } - }; - - const handleMouseDown = (e) => { - setIsDragging(true); - setDragStart({ x: e.clientX, y: e.clientY }); - }; - - const handleMouseMove = (e) => { - if (isDragging) { - const xOffset = e.clientX - dragStart.x; - const yOffset = e.clientY - dragStart.y; - - setPosition({ x: position.x + xOffset, y: position.y + yOffset }); - setDragStart({ x: e.clientX, y: e.clientY }); - } - }; - - const handleMouseUp = () => { - setIsDragging(false); - }; - - if (!isOpen) { - return null; - } - - - return ( -
-
-
- onClose()}>× -
    -
  • - {initialChats.get(tab).partnerName} -
  • - -
-
- - {tab !== "CHATROOM" && ( -
-
    - {initialChats.get(tab)?.chatMessageDTOList?.map((chatMessageDTOList, index) => ( -
  • - {chatMessageDTOList.userId !== userId &&
    {initialChats.get(tab).pictureUrl? ( - - ) : ( -
    - -
    - )}
    } -
    -
    {chatMessageDTOList.message}
    -
    -
  • - ))} - {[...privateChats.get(tab)].map((chat, index) => ( -
  • - - {chat.userId !== userId &&
    {initialChats.get(tab).pictureUrl? ( - - ) : ( -
    - -
    - )}
    } - -
    -
    {chat.message}
    -
    -
  • - ))} -
-
- - -
-
- )} -
-
- ); - }; - - -export default ChatRoom; \ No newline at end of file diff --git a/fitness-web/src/components/chatroom/ChatRoomCoach.jsx b/fitness-web/src/components/chatroom/ChatRoomCoach.jsx deleted file mode 100644 index 0ecd375..0000000 --- a/fitness-web/src/components/chatroom/ChatRoomCoach.jsx +++ /dev/null @@ -1,280 +0,0 @@ -import "./ChatRoom.css"; -import React, { useEffect, useState, useRef } from "react"; -import axios from "axios"; -import { over } from "stompjs"; -import SockJS from "sockjs-client"; -import { Icon } from "@iconify/react"; - -let stompClient = null; - -const ChatRoomCoach = ({ - isOpen, - onClose, - tab, - userData, - initialChats, - setUserData, -}) => { - const [privateChats, setPrivateChats] = useState(new Map()); - const [dragStart, setDragStart] = useState({ x: 0, y: 0 }); - const [position, setPosition] = useState({ x: 0, y: 0 }); - const [isDragging, setIsDragging] = useState(false); - const apiUrl = process.env.REACT_APP_API_URL; - const token = localStorage.getItem("token"); - const chatContentRef = useRef(null); - const userId = Number(localStorage.getItem("userId")); - useEffect(() => { - let Sock = new SockJS(`${apiUrl}/stomp/chat`); - stompClient = over(Sock); - stompClient.connect({}, onConnected, onError); - - return () => { - Sock.close(); - }; - }, []); - - useEffect(() => { - if (stompClient && tab !== "CHATROOM") { - stompClient.subscribe(`/user/${tab}/private`, onPrivateMessage); - } - }, [tab]); - - useEffect(() => { - // 새 채팅이 추가될 때마다 스크롤을 아래로 이동 - if (chatContentRef.current) { - chatContentRef.current.scrollTop = chatContentRef.current.scrollHeight; - } - }, [privateChats, tab]); - - const onConnected = () => { - setUserData({ ...userData, connected: true }); - stompClient.subscribe(`/user/${tab}/private`, onPrivateMessage); - }; - - const onError = (err) => { - console.log(err); - }; - - const onPrivateMessage = (payload) => { - console.log(payload); - var payloadData = JSON.parse(payload.body); - - if (privateChats.get(payloadData.chatRoomId)) { - privateChats.get(payloadData.chatRoomId).push(payloadData); - setPrivateChats(new Map(privateChats)); - } else { - privateChats.set(payloadData.chatRoomId, []); - setPrivateChats(new Map(privateChats)); - } - }; - - useEffect(() => { - axios - .get(`${apiUrl}/coaches/chatrooms`, { - headers: { - token: token, - }, - }) - .then((response) => { - const responseData = response.data; - console.log("API 응답:", responseData); - - if (responseData.isSuccess) { - const { result } = responseData; - const updatedChats = new Map(initialChats); // initialChats로 초기화 - result.forEach((chat) => { - updatedChats.set(chat.chatRoomId, []); // 해당 채팅방의 채팅 정보 가져오기 - }); - console.log("초기 채팅 정보:", updatedChats); - setPrivateChats(updatedChats); // privateChats 상태 업데이트 - } else { - console.log("API 요청 실패:", responseData.message); - } - }) - .catch((error) => { - console.error("API 요청 중 오류 발생", error); - console.error("에러 상세보기", error.response); - }); - }, [userData.memberId, initialChats]); - - const handleMessage = (event) => { - const { value } = event.target; - setUserData({ ...userData, message: value }); - }; - - const sendPrivateValue = async () => { - if (stompClient) { - const chatMessage = { - chatRoomId: tab, - sender: userData.username, - message: userData.message, - userId: initialChats.get(tab).userId, - }; - const updatedPrivateChats = new Map(privateChats); - const chatMessages = [...updatedPrivateChats.get(tab), chatMessage]; // Create a new array with the new message - updatedPrivateChats.set(tab, chatMessages); // Update the map with the new array - - setPrivateChats(updatedPrivateChats); // Update the state with the new map - stompClient.send("/pub/send", {}, JSON.stringify(chatMessage)); - setUserData({ ...userData, message: "" }); - } - }; - - const handleOnKeyPress = (e) => { - if (e.key === "Enter") { - sendPrivateValue(); - } - }; - - const handleMouseDown = (e) => { - setIsDragging(true); - setDragStart({ x: e.clientX, y: e.clientY }); - }; - - const handleMouseMove = (e) => { - if (isDragging) { - const xOffset = e.clientX - dragStart.x; - const yOffset = e.clientY - dragStart.y; - - setPosition({ x: position.x + xOffset, y: position.y + yOffset }); - setDragStart({ x: e.clientX, y: e.clientY }); - } - }; - - const handleMouseUp = () => { - setIsDragging(false); - }; - - if (!isOpen) { - return null; - } - - return ( -
-
-
- onClose()}> - × - -
    -
  • - {initialChats.get(tab).partnerName} -
  • -
-
- - {tab !== "CHATROOM" && ( -
-
    - {initialChats - .get(tab) - ?.chatMessageDTOList?.map((chatMessageDTOList, index) => ( -
  • - {chatMessageDTOList.userId !== userId && ( -
    - {" "} - {initialChats.get(tab).pictureUrl ? ( - - ) : ( -
    - -
    - )} -
    - )} - -
    -
    - {chatMessageDTOList.message} -
    -
    -
  • - ))} - {[...privateChats.get(tab)].map((chat, index) => ( -
  • - {chat.userId !== userId && ( -
    - {" "} - {initialChats.get(tab).pictureUrl ? ( - - ) : ( -
    - -
    - )} -
    - )} - -
    -
    {chat.message}
    -
    -
  • - ))} -
-
- - -
-
- )} -
-
- ); -}; - -export default ChatRoomCoach; diff --git a/fitness-web/src/components/chatroom/Modal.jsx b/fitness-web/src/components/chatroom/Modal.jsx deleted file mode 100644 index 0750628..0000000 --- a/fitness-web/src/components/chatroom/Modal.jsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; - -const Modal = ({ isOpen, onClose, children }) => { - if (!isOpen) return null; - - return ( -
-
- × - {children} -
-
- ); -}; - -export default Modal; \ No newline at end of file diff --git a/fitness-web/src/components/empty/Empty.css b/fitness-web/src/components/empty/Empty.css deleted file mode 100644 index f931197..0000000 --- a/fitness-web/src/components/empty/Empty.css +++ /dev/null @@ -1,4 +0,0 @@ -.blank{ - width: 400px; - height: 400px; -} diff --git a/fitness-web/src/components/empty/Empty.jsx b/fitness-web/src/components/empty/Empty.jsx deleted file mode 100644 index 4600be7..0000000 --- a/fitness-web/src/components/empty/Empty.jsx +++ /dev/null @@ -1,11 +0,0 @@ -import blank from "../../img/blank.png"; -import './Empty.css' -const Empty= () => { - return ( -
- -
- ) -} - -export default Empty; \ No newline at end of file diff --git a/fitness-web/src/components/header/BottomHeader.jsx b/fitness-web/src/components/header/BottomHeader.jsx deleted file mode 100644 index 4c56c67..0000000 --- a/fitness-web/src/components/header/BottomHeader.jsx +++ /dev/null @@ -1,12 +0,0 @@ -import {BhWrap} from "./BottomHeader.style"; -import fitnessImg from "../../img/fitness.svg"; - -export default function BottomHeader() { - return( - - -

운동 별거 없다. 형아랑 같이 운동하자!

-

© 2024 동네형 all rights reserved.

-
- ); -} \ No newline at end of file diff --git a/fitness-web/src/components/header/BottomHeader.style.jsx b/fitness-web/src/components/header/BottomHeader.style.jsx deleted file mode 100644 index 6fbafb8..0000000 --- a/fitness-web/src/components/header/BottomHeader.style.jsx +++ /dev/null @@ -1,34 +0,0 @@ -import styled from "styled-components"; - -export const BhWrap = styled.div` - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - background-color: rgb(255, 255, 255); - width: 100%; /* 부모 요소의 width를 100%로 설정 */ - padding: 10px; - - > img { - margin: auto; - padding-bottom: 5px; - } - - > h4 { - margin: auto; - padding-bottom: 15px; - font-style: normal; - font-size: 13px; - color: #643E23; - } - - > p { - background-color: rgba(255, 149, 73, 1); - width: 100%; - margin: auto; - text-align: center; - color:white; - font-size: 13px; - padding: 20px 10px 20px 10px; - } -`; \ No newline at end of file diff --git a/fitness-web/src/components/header/Header.css b/fitness-web/src/components/header/Header.css deleted file mode 100644 index 9c928cc..0000000 --- a/fitness-web/src/components/header/Header.css +++ /dev/null @@ -1,22 +0,0 @@ -/* Header.css */ - -.header { - display: flex; - justify-content: center; - align-items: center; - background-color: #ffffff; - padding: 1rem; - margin-top: 3%; - width:100%; - } - - .logo { - color: rgb(0, 0, 0); - font-size: 29px; - font-weight: bold; - display: inline-block; - margin-right: 250px; - padding: 20px; - width: 160px; - - } \ No newline at end of file diff --git a/fitness-web/src/components/header/Header.jsx b/fitness-web/src/components/header/Header.jsx deleted file mode 100644 index a60e6b1..0000000 --- a/fitness-web/src/components/header/Header.jsx +++ /dev/null @@ -1,26 +0,0 @@ -import React, { useState } from 'react'; -import { Link } from 'react-router-dom'; -import Menu from '../menu/Menu'; -import mainLogo from '../../img/mainLogo.svg'; -import './Header.css'; - -const Header = () => { - const [activeMenu, setActiveMenu] = useState(null); - - const handleMenuClick = (menu) => { - setActiveMenu(menu); - }; - - return ( -
-
- - Your Logo - -
- -
- ); -}; - -export default Header; \ No newline at end of file diff --git a/fitness-web/src/components/header/ProfileHeader.css b/fitness-web/src/components/header/ProfileHeader.css deleted file mode 100644 index f435beb..0000000 --- a/fitness-web/src/components/header/ProfileHeader.css +++ /dev/null @@ -1,17 +0,0 @@ -.profileHeaderPic{ - border-radius: 50%; - width: 100px; - height: 100px; - background-color: rgb(197, 197, 197); - border-radius: 50%; - align-items: center; - justify-content: center; - display: flex; - - -} -.profileHeaderIcon{ - width : 50px; - height : 50px; - color: gray; -} \ No newline at end of file diff --git a/fitness-web/src/components/header/ProfileHeader.jsx b/fitness-web/src/components/header/ProfileHeader.jsx deleted file mode 100644 index 8573a72..0000000 --- a/fitness-web/src/components/header/ProfileHeader.jsx +++ /dev/null @@ -1,270 +0,0 @@ -import { TopWrap,Wrapper,AskBtn,Btn, BtnWrap, ProfileWrap, Backimgage,RatingWrap, Requirechat, Requirebtn } from "./ProfileHeader.style"; -import React, { useState,useEffect } from "react"; -import { Link,useNavigate } from "react-router-dom"; -import backImg from "../../img/back.svg"; -import unlikeBtn from "../../img/unlike.svg"; -import likeBtn from '../../img/like.svg'; -import star from "../../img/review.svg"; -import axios from "axios"; -import { Icon } from "@iconify/react"; -import "./ProfileHeader.css"; -export default function ProfileHeader(props) { - const navigate = useNavigate(); - const userRole=localStorage.getItem("role"); - const [btnStates, setBtnStates] = useState({ - 프로필: false, - 후기: false, - 사진첩: false - }); - const apiUrl = process.env.REACT_APP_API_URL; - const [userData, setUserData] = useState({ - name: "", - age: 0, - rating:0, - coachPicture:null, - favorites:false - }); - const [likeBtnClicked, setLikeBtnClicked] = useState(false); - const coachId=props.id; - const token=localStorage.getItem("token"); - - const handleImgClick = () => { - - if(userRole=="COACH"){ - alert("같은 동네형이므로 찜할 수 없습니다!"); - return; - } - - if (!token) { - // 토큰이 없는 경우 알림 표시 - alert("로그인 후에 사용할 수 있습니다!"); - return; - } - - const config = { - headers: { - 'token': token // 'token' 헤더 추가 - } - }; - - axios.post(`${apiUrl}/members/favorite/${coachId}`, null, config) - - .then(response => { - console.log("즐겨 추가 응답:", response); - setLikeBtnClicked(prevState => !prevState); - setUserData(prevUserData => ({ - ...prevUserData, - favorites:!userData.favorites - })); - }) - .catch(error => { - console.error("즐겨찾기 추가 요청 중 오류 발생:", error); - console.error("에러 상세 정보:", error.response); - }); - }; - - useEffect(() => { - - - axios.get( - `${apiUrl}/coaches/${coachId}/info`, { - - headers: { - token: token, - }, - } - - ) - .then(response => { - const data = response.data; - console.log("API 응답:", response); - - if (data.isSuccess) { - setUserData({ - name:data.result.nickname, - // age:data.result.age, - rating:data.result.rating, - coachPicture:data.result.coachPicture, - favorites:data.result.favorites - }); - } else { - console.error("API 요청 실패:", data.message); - } - }) - .catch(error => { - console.error("API 요청 중 오류 발생:", error); - console.error("에러 상세 정보:", error.response); - }); - }, []); - - const handleBtnClick = (name) => { - setBtnStates({ - 프로필: false, - 후기: false, - 사진첩: false, - [name]: true - }); - - switch (name) { - - case '프로필': - navigate("/profile",{ - state: { - coachId: coachId, - token:token - } - }); - - break; - - case '후기': - navigate("/lookreviews", { - state: { - coachId: coachId, - token:token - } - }); - break; - case '사진첩': - navigate("/photos",{ - state: { - - coachId: coachId, token:token - - } - });; - break; - default: - break; - } - - }; - const handleChatClick = () => { - - - axios.post(`${apiUrl}/chat/connect`, {coachId},{ - headers: { - 'token': token - } - }) - - .then(response => { - console.log(coachId); - console.log("채팅하기 API 응답:", response); - // 채팅하기 요청에 대한 응답 처리 - }) - .catch(error => { - console.error("채팅하기 API 요청 중 오류 발생:", error); - console.error("에러 상세 정보:", error.response); - }); - }; - - const [matchStatus, setMatchStatus] = useState("UNSUCCESS"); // 성사 상태 - const [buttonText, setButtonText] = useState("성사 요청"); - -// useEffect(() => { -// console.log("성사 상태 확인하기", matchStatus); -// }, [matchStatus]); - -useEffect(() => { - const fetchMatchStatus = async () => { - try { - const response = await axios.post(`${apiUrl}/match/member/register-status`, { coachId }, { headers: { token } }); - setMatchStatus(response.data); - } catch (error) { - console.error("성사 상태 가져오기 요청 중 오류 발생:", error); - console.error("에러 상세 정보:", error.response); - } - }; - - fetchMatchStatus(); // 컴포넌트가 마운트될 때 성사 상태 가져오기 - }, [apiUrl, coachId, token]); - -// 성사 상태가 변경될 때 버튼 텍스트 업데이트 -useEffect(() => { - switch (matchStatus) { - case "WAITING": - setButtonText("요청 대기중"); - break; - case "APPROVED": - setButtonText("성사 완료"); - break; - case "UNSUCCESS": - default: - setButtonText("성사 요청"); - break; - } -}, [matchStatus]); - -const handleRequireClick = () => { - axios.post(`${apiUrl}/match/member`, { coachId }, { headers: { token } }) - .then((response) => { - console.log("성사 요청 API 응답:", response); - }) - .catch((error) => { - console.error("성사 API 요청 중 오류 발생:", error); - console.error("에러 상세 정보:", error.response); - }); -}; - - - return ( - <> - - - - - handleBtnClick("프로필")} style={{backgroundColor: btnStates["프로필"] ? "rgba(255, 149, 73, 1)" : "",}}> - 프로필 - - handleBtnClick('후기')} style={{ backgroundColor: btnStates['후기'] ? "rgba(255, 149, 73, 1)" : "" }}> - 후기 - - handleBtnClick('사진첩')} style={{ backgroundColor: btnStates['사진첩'] ? "rgba(255, 149, 73, 1)" : "" }}> - 사진첩 - - - - - - {buttonText} - - - - 채팅하기 - - - - - - -
- {userData.coachPicture ? ( - 프로필 사진 - ) : ( -
- -
- )}
-

{userData.name} | {userData.age}

-
- - -

{userData.rating}

-
-
- - ); -} \ No newline at end of file diff --git a/fitness-web/src/components/header/ProfileHeader.style.jsx b/fitness-web/src/components/header/ProfileHeader.style.jsx deleted file mode 100644 index c4e3aa8..0000000 --- a/fitness-web/src/components/header/ProfileHeader.style.jsx +++ /dev/null @@ -1,144 +0,0 @@ -import styled from "styled-components"; - -export const Body=styled.body` - background-color: rgba(255, 149, 73, 1); - width:100%; - height:100vh; -` - -export const TopWrap=styled.div` -position: relative; -display: flex; -flex-direction: column; /* 버튼과 배경 이미지를 세로로 나열 */ -align-items: flex-end; /* 오른쪽 정렬 */ -` - -export const Backimgage=styled.img` - height:200px; - width:100%; - margin:auto; - background-size: cover; - object-fit: cover; -` - - - - -export const BtnWrap=styled.div` -flex-direction: row; -align-items: right; -margin: 10px 10px 5px 10px; -display: flex; -align-content: start; -position: absolute; -top: 0; -right: 0; -` - -export const Btn=styled.div` - width: 50px; - height: 15px; - padding: 8px 10px 8px 10px; - border-radius: 20px; - text-align:center; - font-size:13px; - color:white; - margin: 0 3px 0 3px; - background-color: rgb(219, 219, 219); - cursor:pointer; -` - -export const AskBtn=styled.div` -width: 80px; -height: 15px; -padding: 8px 10px 8px 10px; -border-radius: 20px; -font-size:14px; -color:rgba(255, 149, 73, 1); -margin: 0 3px 0 3px; -font-weight:bold; -background-color: rgb(255, 255, 255); -border: 2px solid rgba(255, 149, 73, 1); -position: absolute; -right: 10px; -top: 55px; -display: flex; -align-items: center; -justify-content: center; -cursor:pointer; -` - -export const Wrapper = styled.div` - display: flex; - justify-content: space-between; /* 각 컨테이너를 왼쪽과 오른쪽에 배치 */ - margin-top:-80px; - `; - -export const ProfileWrap = styled.div` - position: relative; - display: flex; - flex-direction: row; - align-items: left; - text-align: left; - align-content: start; - padding-left:10px; - - > img { - border-radius: 50%; - width: 100px; - height: 100px; - } - - > p { - margin: 30px 0 0 10px; - font-size: 15px; - color: white; - font-weight: bold; - } -`; - -export const RatingWrap = styled.div` - position: relative; - display: flex; - flex-direction: row; - align-items: center; - justify-content: flex-end; - padding: 0 30px 0 0px; - margin-top:-20px; - > h4 { - font-size: 25px; - color: white; - font-weight: bold; - text-align: right; - padding-left:10px; - } - - > img { - width: 30px; - } -`; - -export const Requirechat = styled.div` - display: flex; - -` - -export const Requirebtn = styled.div` - width: 80px; - height: 15px; - padding: 8px 10px 8px 10px; - border-radius: 20px; - font-size:14px; - color: ${({ isActive }) => (isActive ? 'white' : 'rgba(255, 149, 73, 1)')}; - margin: 0 3px 0 3px; - font-weight: bold; - background-color: ${({ isActive }) => (isActive ? 'rgb(219, 219, 219);' : 'rgb(255, 255, 255)')}; - border: ${({ isActive }) => (isActive ? 'rgb(219, 219, 219)' : '2px solid rgb(255, 149, 73, 1)')}; /* 비활성화된 상태일 때는 border 없앰 */ - position: absolute; - right: 123px; - top: 55px; - display: flex; - align-items: center; - justify-content: center; - cursor: ${({ isActive }) => (isActive ? 'not-allowed' : 'pointer')}; /* 비활성화된 상태일 때는 커서를 변경 */ -` \ No newline at end of file diff --git a/fitness-web/src/components/imgModal/ImgModal.css b/fitness-web/src/components/imgModal/ImgModal.css deleted file mode 100644 index 5c5d7e0..0000000 --- a/fitness-web/src/components/imgModal/ImgModal.css +++ /dev/null @@ -1,70 +0,0 @@ -.ImgModal{ - /* 초기에는 모달을 숨깁니다. */ - position: fixed; - z-index: 1; - left: 0; - top: 0; - width: 100%; - height: 100%; - overflow: auto; - - padding-top: 60px; - } - .ImgModal-content { - margin: 10% auto; /* 모달이 화면 중앙에 위치하도록 조정합니다. */ - padding-top:3%; - - width: 500px; - height: 200px; /* 모달의 너비를 조정합니다. */ - border-radius: 30px; - background-color: white; - border: solid 2px #643E23; - /*position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - padding: 40px 0px; - /*z-index: 1;*/ - /*user-select: none; - width: 400px; - height: 500px; - border-radius: 30px; - background-color: #FF9549;*/ - - } - - .ImgModal-content .ImgModalClose { - - } - .ImgModalClose -{ - cursor: pointer; - position: absolute; - margin-top: -40px; - margin-left: 450px; - font-size: 40px; - color: #643E23; -} -.chooseImage{ - cursor: pointer; - width: 125px; - height: 125px; - color: #643E23; -} -.ImgModal-container{ - - display: flex; - margin-top: 5px; - justify-content: space-evenly; - -} -.goToNone{ - cursor: pointer; - width: 125px; - height: 125px; - color: #643E23; -} -.ImgModalMent{ - color: #643E23; - font-weight: bold; -} \ No newline at end of file diff --git a/fitness-web/src/components/imgModal/ImgModal.jsx b/fitness-web/src/components/imgModal/ImgModal.jsx deleted file mode 100644 index f1e23cb..0000000 --- a/fitness-web/src/components/imgModal/ImgModal.jsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from "react"; -import "./ImgModal.css"; -import { Icon } from "@iconify/react"; -export default function ImgModal({ - isOpen, - onClose, - inputRef, - handleImageChange, - handleImgDelete, // handleImgDelete 함수 추가 - handleImageClick, -}) { - - const handleChange=(e)=>{ - onClose(); - handleImageChange(e); - } - - const handleNone=(e)=>{ - onClose(); - handleImgDelete(e); - } - - return ( - <> - {isOpen && ( -
-
-
- × -
-
-
- - -
앨범에서 사진 선택
-
-
- -
기본 이미지로 변경
-
-
-
-
- )} - - ); -} \ No newline at end of file diff --git a/fitness-web/src/components/login/SocialGoogle.jsx b/fitness-web/src/components/login/SocialGoogle.jsx deleted file mode 100644 index 913477d..0000000 --- a/fitness-web/src/components/login/SocialGoogle.jsx +++ /dev/null @@ -1,87 +0,0 @@ -import googleImg from "../../img/google.svg" -import styled from "styled-components"; -import { useEffect,useState } from "react"; -import axios from "axios"; - -const Button=styled.button` -background-color: rgba(0, 0, 0, 0); -border-radius: 3px; -border: 1px solid #ffffff; -display: flex; -flex-direction: row; -cursor: pointer; -color: white; -font-size: 15px; -font-weight: light; -padding: 10px 0px; -margin: 10px; -text-align: center; -align-items:center; -justify-content:center; - - ->img{ - height:30px; - padding-right:22px; -} - -&:hover { - box-shadow:1px; -} - -&:active { - position: relative; - top: 1px; -} -`; - - - -const SocialGoogle = ({ handleGoogleLoginResult}) => { - - const apiUrl = process.env.REACT_APP_API_URL; - const clientId = process.env.REACT_APP_GOOGLE_CLIENT_ID; - const google_redirect_uri = "http://localhost:3000/"; - const GOOGLE_SCOPE = process.env.REACT_APP_GOOGLE_SCOPE; - const GOOGLE_AUTH_URL = `https://accounts.google.com/o/oauth2/auth?client_id=${clientId}&redirect_uri=${google_redirect_uri}&response_type=token&scope=${GOOGLE_SCOPE}`; - - const GoogleLogin = () => { - window.location.href = GOOGLE_AUTH_URL; - }; - - useEffect(() => { - const params = new URLSearchParams(window.location.hash.substring(1)); - const access_token = params.get("access_token"); - - if (access_token) { - axios.get(`${apiUrl}/login/oauth2/code/google/token?accessToken=${access_token}`) - .then(response => { - console.log("백엔드로부터 응답:", response.data); - const { userToken, userId, role, isUser } = response.data.result; - localStorage.setItem('token', userToken); - localStorage.setItem('userId', userId); - localStorage.setItem('role', role); - // 사용자 정보를 가져온 후에 이메일 중복 검사를 수행합니다. - //console.log(isUser); - handleGoogleLoginResult(isUser); // 결과를 Menu 컴포넌트로 전달 - }) - .catch(error => { - console.error("에러 발생:", error); - }); - } - },[]); - - - return ( - <> - - - ); -}; - - - -export default SocialGoogle; diff --git a/fitness-web/src/components/member/Member.css b/fitness-web/src/components/member/Member.css deleted file mode 100644 index 850b769..0000000 --- a/fitness-web/src/components/member/Member.css +++ /dev/null @@ -1,23 +0,0 @@ -.memberbgprofile { - background-size: contain; - background-color: #D9D9D9; - width: 150px; - height: 150px; - border-radius: 100px; - color: #919191; - - align-items: center; - justify-content: center; - margin-bottom: 25px; - display: flex; - - - } - - - - - .memberIcon{ - width: 58px; - height: 58px; - } \ No newline at end of file diff --git a/fitness-web/src/components/member/Member.jsx b/fitness-web/src/components/member/Member.jsx deleted file mode 100644 index ca6bf91..0000000 --- a/fitness-web/src/components/member/Member.jsx +++ /dev/null @@ -1,137 +0,0 @@ -import { useRef, useState, useEffect } from "react"; -import { useNavigate } from "react-router-dom"; -import { Link } from "react-router-dom"; -import { Icon } from "@iconify/react"; -import "./Member.css"; -import axios from "axios"; - -function Member({ memberId }) { - // coachId prop을 받음 - const apiUrl = "https://dev.fitness-bro.pro"; - const token = localStorage.getItem("token"); - const [userData, setUserData] = useState({ - nickname: "", - match_num: 0, - review_num: 0, - coachImage: "", - }); - - const textStyle = { - color: "#FF9549", - }; - const navigate = useNavigate(); - const goToReviewList = () => { - navigate("/review-list"); - }; - - useEffect(() => { - axios - .get(`${apiUrl}/members/my-page`, { - headers: { - token: token, - }, - }) - .then((response) => { - const data = response.data; - console.log("API 응답:", response); - - if (data.isSuccess) { - setUserData({ - nickname: data.result.nickname, - match_num: data.result.matchNum, - review_num: data.result.reviewNum, - memberImage: data.result.memberImage, - }); - } else { - console.log("API 요청 실패:", data.message); - } - }) - .catch((error) => { - console.error("API 요청 중 오류 발생", error); - - if (error.response) { - // The request was made and the server responded with a status code - // that falls out of the range of 2xx - console.error("에러 상세보기", error.response.data); - console.error("상태 코드", error.response.status); - console.error("응답 헤더", error.response.headers); - } else if (error.request) { - // The request was made but no response was received - console.error("서버 응답 없음"); - } else { - // Something happened in setting up the request that triggered an Error - console.error("에러 메시지", error.message); - } - }); - }, [memberId]); - - return ( -
- - - - - - - - -
-
- {userData.memberImage ? ( - - ) : ( -
- -
- )} -
- - 나의 정보 수정하기 - -
- {userData.nickname}님, 오늘도 건강하세요! -
- - - - - - -
- 성사 성공    - {userData.match_num} - | - 작성한 후기    - {userData.review_num} -
- - -
- ); -} - -export default Member; diff --git a/fitness-web/src/components/member/MemberCoach.jsx b/fitness-web/src/components/member/MemberCoach.jsx deleted file mode 100644 index 75a63c3..0000000 --- a/fitness-web/src/components/member/MemberCoach.jsx +++ /dev/null @@ -1,132 +0,0 @@ -import { useRef, useState, useEffect } from "react"; -import { Link } from "react-router-dom"; -import { Icon } from "@iconify/react"; -import "./Member.css"; -import axios from "axios"; - -function MemberCoach({ coachId }) { - // coachId prop을 받음 - const apiUrl = process.env.REACT_APP_API_URL; - const token = localStorage.getItem("token"); - const [userData, setUserData] = useState({ - nickname: "", - match_num: 0, - review_num: 0, - coachImage: "", - }); - - const textStyle = { - color: "#FF9549", - }; - - useEffect(() => { - axios - .get(`${apiUrl}/coaches/my-page`, { - headers: { - token: token, - }, - }) - .then((response) => { - const data = response.data; - console.log("API 응답:", response); - - if (data.isSuccess) { - setUserData({ - nickname: data.result.nickname, - match_num: data.result.matchNum, - review_num: data.result.reviewNum, - coachImage: data.result.coachImage, - }); - } else { - console.log("API 요청 실패:", data.message); - } - }) - .catch((error) => { - console.error("API 요청 중 오류 발생", error); - - if (error.response) { - // The request was made and the server responded with a status code - // that falls out of the range of 2xx - console.error("에러 상세보기", error.response.data); - console.error("상태 코드", error.response.status); - console.error("응답 헤더", error.response.headers); - } else if (error.request) { - // The request was made but no response was received - console.error("서버 응답 없음"); - } else { - // Something happened in setting up the request that triggered an Error - console.error("에러 메시지", error.message); - } - }); - }, [coachId]); - - return ( -
- - - - - - - - -
-
- {userData.coachImage ? ( - - ) : ( -
- -
- )} -
- - 나의 정보 수정하기 - -
- {userData.nickname}님, 오늘도 건강하세요! -
- - - - - - -
- 성사 성공    - {userData.match_num} - | - 받은 후기    - {userData.review_num} -
- - -
- ); -} - -export default MemberCoach; diff --git a/fitness-web/src/components/menu/Menu.css b/fitness-web/src/components/menu/Menu.css deleted file mode 100644 index 2a335ff..0000000 --- a/fitness-web/src/components/menu/Menu.css +++ /dev/null @@ -1,46 +0,0 @@ -/* Menu.css */ - -.menu { - align-items: center; /* 메뉴 항목들을 가로로 배열하도록 설정 */ - flex-direction: row; -} - - .search, - .login, - .logout, - .signup, - .mypage { - width: 120px; - height: 35px; - cursor: pointer; - padding: 10px 18px; - margin: 5px; - transition: color 0.3s, background-color 0.3s, border-radius 0.3s; - border-radius: 25px; - display: inline-block; - margin-right: 5px; - margin-left: 5px; - text-align: center; - line-height: 30px; - text-decoration: none; - color: black; - font-weight: 600; - font-size: 16px; - } - - .search:hover, - .login:hover, - .signup:hover, - .logout:hover, - .mypage:hover, - .search.active, - .login.active, - .logout.active, - .mypage.active, - .signup.active { - color: #fff; - background-color: #ff9549; - border-radius: 25px; - text-decoration: none; - } - \ No newline at end of file diff --git a/fitness-web/src/components/menu/Menu.jsx b/fitness-web/src/components/menu/Menu.jsx deleted file mode 100644 index 38c1faf..0000000 --- a/fitness-web/src/components/menu/Menu.jsx +++ /dev/null @@ -1,94 +0,0 @@ -import React, { useState, useEffect, useCallback } from 'react'; -import { useNavigate } from 'react-router-dom'; -import { Link } from 'react-router-dom'; -import './Menu.css'; -import SignInModal from '../modalSignIn/ModalSignIn'; -import SocialGoogle from '../login/SocialGoogle'; -import styled from 'styled-components'; - -const MenuContainer = styled.div` - display: flex; - align-items: center; -`; - -const Menu = ({ activeMenu, handleMenuClick}) => { - const navigate = useNavigate(); - const [isLoggedIn, setIsLoggedIn] = useState(!!localStorage.getItem("role")); - const [userRole, setUserRole] = useState(''); - - const handleGoogleLoginResult = (exist) => { - if (exist) { - setIsLoggedIn(true); - } else { - //console.log(exist); - navigate("/registchoice"); - } - } - - const [isModalInOpen, setIsModalInOpen] = useState(false); - const openModalIn = () => setIsModalInOpen(true); - const closeModalIn = () => setIsModalInOpen(false); - - useEffect(() => { - const token = localStorage.getItem('token'); - const role = localStorage.getItem('role'); - - if (token) { - setIsLoggedIn(true); - setUserRole(role); - - } else { - setIsLoggedIn(false); - setUserRole(''); - } -}, [activeMenu,isLoggedIn]); - - const handleLogout = () => { - //localStorage.clear(); - localStorage.removeItem('token'); - localStorage.removeItem("userId"); - localStorage.removeItem('role'); - setUserRole(''); - setIsLoggedIn(false); - navigate("/") - }; - - - return ( - - - handleMenuClick('search')}> - 동네형 찾기 - - - {/* 로그인 여부 및 role 값에 따라 마이페이지 버튼을 다르게 표시 */} - {isLoggedIn && userRole === 'MEMBER' && ( - handleMenuClick('mypage')}> - 마이 페이지 - - )} - - {isLoggedIn && userRole === 'COACH' && ( - handleMenuClick('mypage')}> - 마이 페이지 - - )} - - {!isLoggedIn && ( -
{ handleMenuClick('login'); openModalIn(); }}> - 로그인/회원가입 -
- )} - - - - {isLoggedIn ? ( -
- 로그 아웃 -
- ):(null)} -
- ); -}; - -export default Menu; \ No newline at end of file diff --git a/fitness-web/src/components/modalSignIn/ModalSignIn.jsx b/fitness-web/src/components/modalSignIn/ModalSignIn.jsx deleted file mode 100644 index 4e1262f..0000000 --- a/fitness-web/src/components/modalSignIn/ModalSignIn.jsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { ModalButton, ModalContainer, ModalOverlay,ButtonWrap } from './ModalSignIn.style'; -import SocialGoogle from '../login/SocialGoogle'; -import loginLogo from '../../img/loginLogo.svg'; - -const ModalSignIn = ({ isOpen,closeModalIn }) => { -return ( -
- - - -

로그인

- - - - 닫기 -
-
-); -}; - -export default ModalSignIn; \ No newline at end of file diff --git a/fitness-web/src/components/modalSignIn/ModalSignIn.style.jsx b/fitness-web/src/components/modalSignIn/ModalSignIn.style.jsx deleted file mode 100644 index c631e3e..0000000 --- a/fitness-web/src/components/modalSignIn/ModalSignIn.style.jsx +++ /dev/null @@ -1,54 +0,0 @@ -import styled from 'styled-components'; - -export const ModalOpenBody = styled.body` - overflow: hidden; -`; - -export const ModalOverlay = styled.div` - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 1; -`; - -export const ModalContainer = styled.div` - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - background: rgba(255, 149, 73, 1); - padding: 20px; - border-radius: 8px; - text-align: center; - z-index: 2; - color:white; - width:400px; - height:400px; - flex-direction: column; - display:flex; - >img{ - width:40%; - align-self:center; - } -`; - -export const ModalButton = styled.button` - margin: 10px; - padding: 10px; - background-color: rgba(0, 0, 0, 0); - border-radius: 3px; -border: 3px solid #ffffff; - color: white; - border: none; - border-radius: 4px; - cursor: pointer; - align-self: end; - font-weight:bold; -`; - -export const ButtonWrap=styled.div` -display:flex; -flex-direction:column; -` \ No newline at end of file diff --git a/fitness-web/src/components/modalSignUp/ModalSignUp.jsx b/fitness-web/src/components/modalSignUp/ModalSignUp.jsx deleted file mode 100644 index eab6837..0000000 --- a/fitness-web/src/components/modalSignUp/ModalSignUp.jsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { ModalButton, ModalContainer, ModalOverlay,ButtonWrap } from './ModalSignUp.style'; -import SocialUpGoogle from '../signup/SocialUpGoogle'; -import loginLogo from '../../img/loginLogo.svg'; - -const ModalSignUp = ({ isOpen,closeModalUp }) => { -return ( -
- - - -

로그인

- - - - 닫기 -
-
-); -}; - -export default ModalSignUp; \ No newline at end of file diff --git a/fitness-web/src/components/modalSignUp/ModalSignUp.style.jsx b/fitness-web/src/components/modalSignUp/ModalSignUp.style.jsx deleted file mode 100644 index c631e3e..0000000 --- a/fitness-web/src/components/modalSignUp/ModalSignUp.style.jsx +++ /dev/null @@ -1,54 +0,0 @@ -import styled from 'styled-components'; - -export const ModalOpenBody = styled.body` - overflow: hidden; -`; - -export const ModalOverlay = styled.div` - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 1; -`; - -export const ModalContainer = styled.div` - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - background: rgba(255, 149, 73, 1); - padding: 20px; - border-radius: 8px; - text-align: center; - z-index: 2; - color:white; - width:400px; - height:400px; - flex-direction: column; - display:flex; - >img{ - width:40%; - align-self:center; - } -`; - -export const ModalButton = styled.button` - margin: 10px; - padding: 10px; - background-color: rgba(0, 0, 0, 0); - border-radius: 3px; -border: 3px solid #ffffff; - color: white; - border: none; - border-radius: 4px; - cursor: pointer; - align-self: end; - font-weight:bold; -`; - -export const ButtonWrap=styled.div` -display:flex; -flex-direction:column; -` \ No newline at end of file diff --git a/fitness-web/src/components/modalsearch/ModalSearch.css b/fitness-web/src/components/modalsearch/ModalSearch.css deleted file mode 100644 index 952932d..0000000 --- a/fitness-web/src/components/modalsearch/ModalSearch.css +++ /dev/null @@ -1,30 +0,0 @@ -.modalsearch-content { - margin: 5% auto; - width: 80%; - color: #643E23; - } - - .modalsearch-content ul { - list-style-type: none; - } - - .modalsearch-content li p { - cursor: pointer; - transition: background-color 0.3s; - max-height: 150px; - overflow-y: auto; - height: 100%; - margin-top : 24px; - - } - - /* ModalSearch.css */ - .modalsearch-content li .highlighted-text { - color: #FF9549; /* 강조할 색상을 설정하세요 */ - font-weight: bold; - } - - .modalsearch-content li:hover { - color: #FF9549; - font-weight: bold; - } \ No newline at end of file diff --git a/fitness-web/src/components/modalsearch/ModalSearch.jsx b/fitness-web/src/components/modalsearch/ModalSearch.jsx deleted file mode 100644 index e9cecb8..0000000 --- a/fitness-web/src/components/modalsearch/ModalSearch.jsx +++ /dev/null @@ -1,59 +0,0 @@ -import React, {useEffect} from "react"; -import Modal from "react-modal"; -import "./ModalSearch.css"; - - - -const ModalSearch = ({ open, onClose, gymList, onGymClick, keyword }) => { - - useEffect(() => { - // 컴포넌트가 마운트될 때 한 번만 실행 - Modal.setAppElement('body'); - }, []); - - return ( - - -
-
- {gymList && gymList.length > 0 ? ( -
    - {gymList.map((gym) => ( -
  • onGymClick(gym)}> -

    - - {typeof gym.name === 'object' ? gym.name.name : gym.name}     - - - {gym.region} {gym.subAddress} {gym.detailAddress} - -

    -
  • - ))} -
- ) : ( -

검색 결과가 없습니다.

- )} -
-
-
- ); -}; - -export default ModalSearch; \ No newline at end of file diff --git a/fitness-web/src/components/review/DefaultImage.css b/fitness-web/src/components/review/DefaultImage.css deleted file mode 100644 index 87b37f3..0000000 --- a/fitness-web/src/components/review/DefaultImage.css +++ /dev/null @@ -1,13 +0,0 @@ -.DefaultImage { - background-size: contain; - background-color: #D9D9D9; - width: 100px; - height: 100px; - border-radius: 100px; - color: #919191; - margin-left: 10px; - - align-items: center; - justify-content: center; - display: flex; - } \ No newline at end of file diff --git a/fitness-web/src/components/review/DefaultImage.js b/fitness-web/src/components/review/DefaultImage.js deleted file mode 100644 index b55bbde..0000000 --- a/fitness-web/src/components/review/DefaultImage.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Icon } from "@iconify/react"; -import './DefaultImage.css' - -const DefaultImage = () => { - return ( -
- -
- ) -} - -export default DefaultImage; \ No newline at end of file diff --git a/fitness-web/src/components/review/StarRating.css b/fitness-web/src/components/review/StarRating.css deleted file mode 100644 index e69de29..0000000 diff --git a/fitness-web/src/components/review/StarRating.jsx b/fitness-web/src/components/review/StarRating.jsx deleted file mode 100644 index be90383..0000000 --- a/fitness-web/src/components/review/StarRating.jsx +++ /dev/null @@ -1,41 +0,0 @@ -import React, { useState } from "react"; -import { Icon } from "@iconify/react"; -import './StarRating.css'; - -// 별점 컴포넌트 - -const StarRating = ({ onStarClick }) => { - const [rating, setRating] = useState(0); - - const handleStarClick = (starIndex) => { // 별 아이콘을 클릭했을 때 호출되는 함수 - - setRating(starIndex + 1); // 클릭한 별의 인덱스에 1을 더한 값을 `rating` 상태로 설정 - onStarClick(starIndex + 1); // 상위 컴포넌트로 선택된 별의 값 전달 - }; - - const renderStars = () => { // 별 아이콘을 렌더링하는 함수 - - // 길이가 5인 배열을 생성하고 각 요소에 인덱스를 할당 - const starArray = Array.from({ length: 5 }, (_, index) => index); - - return starArray.map((index) => ( // 배열을 순회하며 각각의 별 아이콘을 생성 - handleStarClick(index)} // 별 아이콘을 클릭했을 때 `handleStarClick` 함수 호출 - className="star" - > - - {/* 현재 별의 인덱스가 `rating`보다 크면 빈 별, 아니면 채워진 별 */} - = rating ? "carbon:star" : "carbon:star-filled"} - style={{ color: "#643E23" }} - /> - - )); - }; - - // 렌더링된 별 아이콘들을 감싸는 div를 반환 - return
{renderStars()}
; -}; - -export default StarRating; diff --git a/fitness-web/src/components/review/ToggleMenu.css b/fitness-web/src/components/review/ToggleMenu.css deleted file mode 100644 index a4717a7..0000000 --- a/fitness-web/src/components/review/ToggleMenu.css +++ /dev/null @@ -1,53 +0,0 @@ -.toggle-menu { - position: absolute; - display: flex; - width: 100px; -} - -.options { - display: flex; - flex-direction: column; - position: absolute; - top: 30px; - left: 15px; -} - -.toggle-btn { - color: #643E23; - background-color: white; - border: none; - cursor: pointer; - font-size: 15px; - font-weight: bold; -} - -.options button { - display: block; - border: 5px solid #FF9549; - background-color: white; - padding: 5px; - cursor: pointer; - color: #643E23; - font-size: 15px; - font-weight: bold; - margin-bottom: -3px; /* 각 버튼 사이 간격 조정 */ -} - -.toggleIcon { - display: flex; - flex-direction: row; - margin-top: -15px; -} - -.toggleIcon p { - color: #FF9549; - font-weight: bold; - font-size: 15px; - margin-left: 7px; -} - -.toggle-menu-icon { - font-size: 20px; - color: #643E23; - margin-top: 13px; -} \ No newline at end of file diff --git a/fitness-web/src/components/review/ToggleMenu.jsx b/fitness-web/src/components/review/ToggleMenu.jsx deleted file mode 100644 index ec8f031..0000000 --- a/fitness-web/src/components/review/ToggleMenu.jsx +++ /dev/null @@ -1,53 +0,0 @@ -// ToggleMenu.jsx -import { useState } from "react"; -import { Icon } from "@iconify/react"; -import './ToggleMenu.css'; - -const ToggleMenu = ({ coachNicknames, onCoachSelect }) => { - - const [showToggleMenu, setShowToggleMenu] = useState(false); - const [selectedOption, setSelectedOption] = useState(null); - - const handleToggleMenu = () => { - setShowToggleMenu(!showToggleMenu); - }; - - const handleOptionSelect = (coachName) => { - setShowToggleMenu(false); - setSelectedOption(coachName); // 선택된 코치 이름 설정 - onCoachSelect(coachName); - }; - - // coachNicknames가 비어있을 때 처리 - if (!coachNicknames || coachNicknames.length === 0) { - return
No coach available
; - } - - return ( -
-
-
- -
- -
-
- {showToggleMenu && ( -
- - {coachNicknames.map((coachName,index) => ( - - ))} - -
- )} -
-
- ); -}; - -export default ToggleMenu; \ No newline at end of file diff --git a/fitness-web/src/components/signup/SocialUpGoogle.jsx b/fitness-web/src/components/signup/SocialUpGoogle.jsx deleted file mode 100644 index e0fb7e3..0000000 --- a/fitness-web/src/components/signup/SocialUpGoogle.jsx +++ /dev/null @@ -1,78 +0,0 @@ -import googleImg from "../../img/google.svg" -import styled from "styled-components"; -import { useEffect} from "react"; -import axios from "axios"; - -const Button=styled.button` -background-color: rgba(0, 0, 0, 0); -border-radius: 3px; -border: 1px solid #ffffff; -display: flex; -flex-direction: row; -cursor: pointer; -color: white; -font-size: 15px; -font-weight: light; -padding: 10px 0px; -margin: 10px; -text-align: center; -align-items:center; -justify-content:center; - - ->img{ - height:30px; - padding-right:22px; -} - -&:hover { - box-shadow:1px; -} - -&:active { - position: relative; - top: 1px; -} -`; - - -const SocialUpGoogle = () => { - const apiUrl = process.env.REACT_APP_API_URL; - const clientId = '293755776535-kp2pp4pfe0c4401civ1g2fum81f3etdo.apps.googleusercontent.com' - const google_redirect_uri='http://localhost:3000/registchoice' - const GOOGLE_SCOPE='https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile' - const GOOGLE_AUTH_URL=`https://accounts.google.com/o/oauth2/auth?client_id=${clientId}&redirect_uri=${google_redirect_uri}&response_type=token&scope=${GOOGLE_SCOPE}`; - - const GoogleLogin=()=>{ - window.location.href=GOOGLE_AUTH_URL; - }; - - useEffect(() => { - const params = new URLSearchParams(window.location.hash.substring(1)); - const access_token = params.get("access_token"); - - if (access_token) { - - axios.get(`${apiUrl}/login/oauth2/code/google/token?accessToken=${access_token}`) - .then(response => { - console.log("백엔드로부터 응답:", response); - const { userToken, userId, role } = response.data.result; - localStorage.setItem('token', userToken); - localStorage.setItem('userId', userId); - localStorage.setItem('role', role); - }) - .catch(error => { - console.error("에러 발생:", error); - - }); - } - }, []); - - return ; - -}; - -export default SocialUpGoogle; \ No newline at end of file diff --git a/fitness-web/src/img/back.svg b/fitness-web/src/img/back.svg deleted file mode 100644 index 6e8db76..0000000 --- a/fitness-web/src/img/back.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/fitness-web/src/img/blank.png b/fitness-web/src/img/blank.png deleted file mode 100644 index 4c68541..0000000 Binary files a/fitness-web/src/img/blank.png and /dev/null differ diff --git a/fitness-web/src/img/fitness.svg b/fitness-web/src/img/fitness.svg deleted file mode 100644 index 84d7b7b..0000000 --- a/fitness-web/src/img/fitness.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/fitness-web/src/img/footer.svg b/fitness-web/src/img/footer.svg deleted file mode 100644 index 8d33e8c..0000000 --- a/fitness-web/src/img/footer.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/fitness-web/src/img/google.svg b/fitness-web/src/img/google.svg deleted file mode 100644 index 033b749..0000000 --- a/fitness-web/src/img/google.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/fitness-web/src/img/kakaotalk.svg b/fitness-web/src/img/kakaotalk.svg deleted file mode 100644 index 8fa6c6b..0000000 --- a/fitness-web/src/img/kakaotalk.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fitness-web/src/img/kangaroo.svg b/fitness-web/src/img/kangaroo.svg deleted file mode 100644 index 11b950a..0000000 --- a/fitness-web/src/img/kangaroo.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/fitness-web/src/img/like.svg b/fitness-web/src/img/like.svg deleted file mode 100644 index fd1f87e..0000000 --- a/fitness-web/src/img/like.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/fitness-web/src/img/loginLogo.svg b/fitness-web/src/img/loginLogo.svg deleted file mode 100644 index 3dae85f..0000000 --- a/fitness-web/src/img/loginLogo.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/fitness-web/src/img/logo.svg b/fitness-web/src/img/logo.svg deleted file mode 100644 index f97ad36..0000000 --- a/fitness-web/src/img/logo.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/fitness-web/src/img/mainLogo.svg b/fitness-web/src/img/mainLogo.svg deleted file mode 100644 index b8aecdc..0000000 --- a/fitness-web/src/img/mainLogo.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/fitness-web/src/img/mapmarker.svg b/fitness-web/src/img/mapmarker.svg deleted file mode 100644 index 4624b4b..0000000 --- a/fitness-web/src/img/mapmarker.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/fitness-web/src/img/mapmarkerSelected.svg b/fitness-web/src/img/mapmarkerSelected.svg deleted file mode 100644 index d5b6008..0000000 --- a/fitness-web/src/img/mapmarkerSelected.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/fitness-web/src/img/naver.svg b/fitness-web/src/img/naver.svg deleted file mode 100644 index a3411e5..0000000 --- a/fitness-web/src/img/naver.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/fitness-web/src/img/orange.svg b/fitness-web/src/img/orange.svg deleted file mode 100644 index d383b0f..0000000 --- a/fitness-web/src/img/orange.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/fitness-web/src/img/profile.jpg b/fitness-web/src/img/profile.jpg deleted file mode 100644 index c2ad5e4..0000000 Binary files a/fitness-web/src/img/profile.jpg and /dev/null differ diff --git a/fitness-web/src/img/profile.png b/fitness-web/src/img/profile.png deleted file mode 100644 index 05c3476..0000000 Binary files a/fitness-web/src/img/profile.png and /dev/null differ diff --git a/fitness-web/src/img/profileImage.png b/fitness-web/src/img/profileImage.png deleted file mode 100644 index bf049c0..0000000 Binary files a/fitness-web/src/img/profileImage.png and /dev/null differ diff --git a/fitness-web/src/img/registLogo1.svg b/fitness-web/src/img/registLogo1.svg deleted file mode 100644 index b23e736..0000000 --- a/fitness-web/src/img/registLogo1.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/fitness-web/src/img/registLogo2.svg b/fitness-web/src/img/registLogo2.svg deleted file mode 100644 index c6605c5..0000000 --- a/fitness-web/src/img/registLogo2.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/fitness-web/src/img/review.svg b/fitness-web/src/img/review.svg deleted file mode 100644 index 5b36adf..0000000 --- a/fitness-web/src/img/review.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/fitness-web/src/img/unlike.svg b/fitness-web/src/img/unlike.svg deleted file mode 100644 index c94c008..0000000 --- a/fitness-web/src/img/unlike.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/fitness-web/src/index.css b/fitness-web/src/index.css index c643317..ec2585e 100644 --- a/fitness-web/src/index.css +++ b/fitness-web/src/index.css @@ -1,4 +1,3 @@ - body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', @@ -6,6 +5,9 @@ body { sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - /* background-color: rgb(255, 255, 255); */ } +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + monospace; +} diff --git a/fitness-web/src/index.js b/fitness-web/src/index.js index 2870384..d563c0f 100644 --- a/fitness-web/src/index.js +++ b/fitness-web/src/index.js @@ -2,7 +2,7 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; - +import reportWebVitals from './reportWebVitals'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( @@ -10,3 +10,8 @@ root.render( ); + +// If you want to start measuring performance in your app, pass a function +// to log results (for example: reportWebVitals(console.log)) +// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals +reportWebVitals(); diff --git a/fitness-web/src/pages/ChatingList.jsx b/fitness-web/src/pages/ChatingList.jsx deleted file mode 100644 index 0138bd5..0000000 --- a/fitness-web/src/pages/ChatingList.jsx +++ /dev/null @@ -1,157 +0,0 @@ -import React, { useState, useEffect } from "react"; -import ChatRoom from "../components/chatroom/ChatRoom"; -import { useNavigate } from "react-router-dom"; -import axios from "axios"; -import { Icon } from "@iconify/react"; - -const Chattinglist = () => { - const [tab, setTab] = useState("CHATROOM"); - const [userData, setUserData] = useState({ - username: "", - connected: false, - message: "", - userId: null, - }); - const apiUrl = "http://dev.fitness-bro.pro"; - const token=localStorage.getItem("token"); - const [isModalOpen, setIsModalOpen] = useState(false); - const openModal = () => setIsModalOpen(true); - const closeModal = () => setIsModalOpen(false); - - const [initialChats, setInitialChats] = useState(new Map()); - - useEffect(() => { - let source = axios.CancelToken.source(); // Axios 요청 취소를 위한 CancelToken 생성 - - axios - .get(`${apiUrl}/members/chatrooms`, { - headers: { - token: token, - }, - cancelToken: source.token, // 요청에 사용할 취소 토큰 설정 - }) - .then((response) => { - const responseData = response.data; - console.log("API 응답:", responseData); - - if (responseData.isSuccess) { - const { result } = responseData; - setUserData({ - username: result[0].userName, - userId: result[0].userId, - }); - const updatedChats = new Map(); - result.forEach((chat) => { - updatedChats.set(chat.chatRoomId, chat); // 채팅방 ID를 키로 사용하여 채팅방 정보를 추가 - }); - console.log("초기 채팅 정보:", updatedChats); - setInitialChats(updatedChats); - } else { - console.log("API 요청 실패:", responseData.message); - } - }) - .catch((error) => { - if (axios.isCancel(error)) { - console.log("요청이 취소되었습니다.", error.message); - } else { - console.error("API 요청 중 오류 발생", error); - console.error("에러 상세보기", error.response); - } - }); - - return () => { - // 컴포넌트가 언마운트되면 axios 요청 취소 - source.cancel("Component unmounted"); - }; - }, []); // 빈 의존성 배열을 사용하여 컴포넌트가 처음 렌더링될 때만 API 요청을 수행 - const navigate = useNavigate(); - const onClickBackBtn = () => { - navigate(-1); - }; - return ( -
-
-

채팅리스트

- -
- -
-
- {initialChats.size === 0 ? ( // initialChats의 길이를 확인하여 조건부 렌더링 -

텅 비었습니다

// 배열이 비어있는 경우 "텅 비었습니다"를 출력 - ) : ( -
    - {[...initialChats.keys()].map((chatRoomId) => ( -
  • { - setTab(chatRoomId); - openModal(); - }} - className={`member ${tab === chatRoomId && "active"}`} - key={chatRoomId} - > -
    -
    -
    - {initialChats.get(chatRoomId).pictureUrl ? ( - 프로필 사진 - ) : ( -
    - -
    - )} -
    -
    -
    {initialChats.get(chatRoomId).partnerName}
    -
    {initialChats.get(chatRoomId).lastChatMessage}
    -
    -
    -
    - {initialChats.get(chatRoomId).lastChatTime && ( -
    - {new Date(initialChats.get(chatRoomId).lastChatTime).toLocaleString([], { - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit", - })} -
    - )} -
    -
    -
  • - ))} -
- )} -
-
- {/* 모달 */} - -
- ); -}; - - -export default Chattinglist; \ No newline at end of file diff --git a/fitness-web/src/pages/ChattingList.css b/fitness-web/src/pages/ChattingList.css deleted file mode 100644 index 3508628..0000000 --- a/fitness-web/src/pages/ChattingList.css +++ /dev/null @@ -1,62 +0,0 @@ -.chatPartner { - display: flex; - justify-content: space-between; - align-items: center; /* 요소를 수직으로 가운데 정렬합니다. */ - - } -.chatPartner-info{ - display: flex; - align-items: center; - -} -.chatPartner-body{ - margin-left: 1rem; -} -.chatPartner-name{ - font-size: 17px; - margin-bottom: 6px; - margin-top: -10px; - - -} -.chatPartner img { - width: 50px; - height: 50px; - border-radius: 50%; - margin-right: 10px; -} -.member-list ul{ - list-style: none; - display: flex; - flex-direction: column; - align-items: center; - overflow: auto; -} -.member-list li { - - align-items: center; - border-radius: 3px; - width: 65%; - height: 80px; - font-size: 15px; - padding-top: 30px; - margin: 10px; - color: #643E23; -} -.chattingprofile{ - background-size: contain; - border: 2px solid #643E23; - width: 70px; - height: 70px; - border-radius: 100px; - color: #643E23; - align-items: center; - justify-content: center; - display: flex; - margin-right: 5px; -} - - .chattingIcon{ - width: 40px; - height: 40px; - } \ No newline at end of file diff --git a/fitness-web/src/pages/ChattingListCoach.jsx b/fitness-web/src/pages/ChattingListCoach.jsx deleted file mode 100644 index 1109d1a..0000000 --- a/fitness-web/src/pages/ChattingListCoach.jsx +++ /dev/null @@ -1,153 +0,0 @@ -import React, { useState, useEffect } from "react"; -import ChatRoomCoach from "../components/chatroom/ChatRoomCoach"; -import './ChattingList.css'; -import axios from "axios"; -import { Icon } from "@iconify/react"; -import { useNavigate } from "react-router-dom"; -const ChattingListCoach = () => { - const [tab, setTab] = useState("CHATROOM"); - const [userData, setUserData] = useState({ - username: "", - userId: null, - connected: false, - message: "", - }); - const apiUrl = process.env.REACT_APP_API_URL; - const token = localStorage.getItem("token"); - const [isModalOpen, setIsModalOpen] = useState(false); - const openModal = () => setIsModalOpen(true); - const closeModal = () => setIsModalOpen(false); - const [initialChats, setInitialChats] = useState(new Map()); - - useEffect(() => { - let source = axios.CancelToken.source(); // Axios 요청 취소를 위한 CancelToken 생성 - - axios - .get(`${apiUrl}/coaches/chatrooms`, { - headers: { - token: token, - }, - cancelToken: source.token, // 요청에 사용할 취소 토큰 설정 - }) - .then((response) => { - const responseData = response.data; - console.log("API 응답:", responseData); - - if (responseData.isSuccess) { - const { result } = responseData; - setUserData({ - username: result[0].userName, - userId: result[0].userId, - }); - const updatedChats = new Map(); - result.forEach((chat) => { - updatedChats.set(chat.chatRoomId, chat); // 채팅방 ID를 키로 사용하여 채팅방 정보를 추가 - }); - console.log("초기 채팅 정보:", updatedChats); - setInitialChats(updatedChats); - } else { - console.log("API 요청 실패:", responseData.message); - } - }) - .catch((error) => { - if (axios.isCancel(error)) { - console.log("요청이 취소되었습니다.", error.message); - } else { - console.error("API 요청 중 오류 발생", error); - console.error("에러 상세보기", error.response); - } - }); - - return () => { - // 컴포넌트가 언마운트되면 axios 요청 취소 - source.cancel("Component unmounted"); - }; - }, []); // 빈 의존성 배열을 사용하여 컴포넌트가 처음 렌더링될 때만 API 요청을 수행 - const navigate = useNavigate(); - const onClickBackBtn = () => { - navigate(-1); - }; - return ( -
-
-

채팅리스트

- -
- -
-
- -
    - {[...initialChats.keys()].map((chatRoomId) => ( -
  • { - setTab(chatRoomId); - openModal(); - }} - className={`member ${tab === chatRoomId && "active"}`} - key={chatRoomId} - > -
    -
    -
    - {initialChats.get(chatRoomId).pictureUrl? ( - - ) : ( -
    - -
    - )} -
    -
    -
    {initialChats.get(chatRoomId).partnerName}
    -
    {initialChats.get(chatRoomId).lastChatMessage}
    -
    -
    -
    - {initialChats.get(chatRoomId).lastChatTime && ( -
    - {new Date( - initialChats.get(chatRoomId).lastChatTime - ).toLocaleString([], { - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit", - })} -
    - )} -
    -
    -
  • - ))} -
-
- {/* 모달 */} - -
-
- ); -}; - -export default ChattingListCoach; diff --git a/fitness-web/src/pages/Favorites.css b/fitness-web/src/pages/Favorites.css deleted file mode 100644 index 397acee..0000000 --- a/fitness-web/src/pages/Favorites.css +++ /dev/null @@ -1,3 +0,0 @@ -.Favorites { - text-align: center; - } \ No newline at end of file diff --git a/fitness-web/src/pages/Favorites.js b/fitness-web/src/pages/Favorites.js deleted file mode 100644 index 7b0d3f7..0000000 --- a/fitness-web/src/pages/Favorites.js +++ /dev/null @@ -1,95 +0,0 @@ -import { useState, useEffect } from "react"; -import { useNavigate } from "react-router-dom"; -import axios from "axios"; -import DefaultImage from '../components/review/DefaultImage'; -import Empty from "../components/empty/Empty.jsx"; - -// 찜한 형 리스트 - -const Favorites = () => { - const navigate = useNavigate(); - - const apiUrl = process.env.REACT_APP_API_URL; - const token = localStorage.getItem("token"); - - const [userData, setUserData] = useState([]); - - useEffect(() => { - - axios.get(`${apiUrl}/members/favorites`, { - headers: { - 'token': token - } - }) - - .then(response => { - const data = response.data; - console.log("API 응답:", response); - - if (data.isSuccess) { - const results=data.result; - setUserData(results); - - } else { - console.error("API 요청 실패:", data.message); - } - }) - .catch(error => { - console.error("API 요청 중 오류 발생:", error); - console.error("에러 상세 정보:", error.response); - }); - }, []); - - const onClickBackBtn = () => { - navigate(-1); - }; - const goToCoachProfile = (userId) => { - // 클릭된 프로필의 userId를 사용하여 프로필 페이지로 이동 - console.log(userId) - navigate("/profile",{state:{coachId:userId}}); - - }; - return ( -
- -
-

찜한 형 리스트

- -
- -
- {userData.length === 0 ? ( // userData의 길이를 확인하여 배열이 비어있을때 - -
-
-
아직 비어있어요!
-
- - ) : ( -
    - {userData.map((item, index) => ( -
  • goToCoachProfile(item.coachId)}> - {/* 프로필 이미지 */} - {item.coachImage ? ( - 프로필 이미지 - ) : ( - - )} - -
    - {/* 이름/주소 */} -

    {item.nickname} / {item.address}

    - - {/* 별점 */} -

    ★{item.rating}

    -
    -
  • - ))} -
- )} -
-
- ); -}; - -export default Favorites; \ No newline at end of file diff --git a/fitness-web/src/pages/GetReviewList.js b/fitness-web/src/pages/GetReviewList.js deleted file mode 100644 index 13e916f..0000000 --- a/fitness-web/src/pages/GetReviewList.js +++ /dev/null @@ -1,91 +0,0 @@ -import { useState, useEffect } from "react"; -import { useNavigate } from "react-router-dom"; -import axios from "axios"; -import DefaultImage from '../components/review/DefaultImage'; -import {useLocation} from "react-router-dom"; -import Empty from "../components/empty/Empty.jsx"; - -// 받은 후기 리스트 - -const GetReviewList = () => { - const navigate = useNavigate(); - - const apiUrl = process.env.REACT_APP_API_URL; - - const [userData, setUserData] = useState([]); - - - const location = useLocation(); - const coachId = location.state.coachId; - - useEffect(() => { - - axios.get(`${apiUrl}/coaches/${coachId}/reviews`) - .then((response) => { - const data = response.data; - console.log("API 응답:", response); - - if (data.isSuccess) { - const results=data.result; - setUserData(results); - } else { - console.error("API 요청 실패:", data.message); - } - }) - .catch(error => { - console.error("API 요청 중 오류 발생:", error); - console.error("에러 상세 정보:", error.response); - }); - }, [coachId]); - - const onClickBackBtn = () => { - navigate(-1); - }; - - const goToReviewDetail = (review_id) => { // /review-detail로 review_id를 props로 넘겨주기 - navigate("/review-detail",{state:{reviewId:review_id}}); - }; - - return ( -
-
-

받은 후기 리스트

- -
- -
- {userData.length === 0 ? ( // userData의 길이를 확인하여 배열이 비어있을때 - -
-
-
아직 비어있어요!
-
- - ) : ( -
    - {userData.map((item, index) => ( -
  • goToReviewDetail(item.review_id)}> - {/* 프로필 이미지 */} - {item.pictureURL ? ( - 프로필 이미지 - ) : ( - - )} - -
    - {/* 날짜 */} -

    {item.createdAt}

    - - {/* 닉네임 */} -

    {item.nickname}

    -
    -
  • - ))} -
- )} -
-
- ); -}; - -export default GetReviewList; \ No newline at end of file diff --git a/fitness-web/src/pages/LookReviews.jsx b/fitness-web/src/pages/LookReviews.jsx deleted file mode 100644 index fdd70ab..0000000 --- a/fitness-web/src/pages/LookReviews.jsx +++ /dev/null @@ -1,56 +0,0 @@ -import { React, useState, useEffect } from "react"; -import { Body, ReviewBlock } from "./LookReviews.style"; -import Header from "../components/header/ProfileHeader"; -import reviewerImg from "../img/profile.jpg"; -import axios from "axios"; -import { Link, useLocation } from "react-router-dom"; - -export default function LookReviews(props) { - const [reviews, setReviews] = useState([]); - const [error, setError] = useState(null); - const apiUrl = process.env.REACT_APP_API_URL; - const location = useLocation(); - const coachId = location.state.coachId - const token=localStorage.getItem("token"); - - - useEffect(() => { - - axios.get(`${apiUrl}/coaches/${coachId}/reviews`,{ - headers:{ - 'token':token - } - }) - .then(response => { - const data = response.data; - console.log("API 응답:", data); - - if (data.isSuccess) { - setReviews(data.result) - } else { - setError(data.message); - } - }) - .catch(error => { - console.error("API 요청 중 오류 발생:", error); - console.error("에러 상세 정보:", error.response); - }); - }, []); - - return ( - -
- {error &&

Error: {error}

} - {reviews && reviews.map((review) => ( - // - - - 리뷰자 프로필 이미지 -

{review.nickname}

-

{review.content}

-
- - ))} - - ); -} \ No newline at end of file diff --git a/fitness-web/src/pages/LookReviews.style.jsx b/fitness-web/src/pages/LookReviews.style.jsx deleted file mode 100644 index d2cb2c6..0000000 --- a/fitness-web/src/pages/LookReviews.style.jsx +++ /dev/null @@ -1,41 +0,0 @@ -import styled from "styled-components"; - - -export const Body=styled.body` - background-color: rgb(255, 255, 255); - width:100%; - height:100vh; -` - -export const ReviewBlock=styled.div` - background-color: rgba(255, 149, 73, 0.5); - border-radius:3px; - height:100px; - width:90%; - margin: auto; - margin-top:10px; - margin-bottom: 15px; - padding:0 0 0 10px; - color:rgba(100, 62, 35, 1); - font-size:15px; - display:flex; - align-items:center; - font-weight:bold; - >img{ - border-radius: 50%; - width: 70px; - height: 70px; - - } - > h4 { - margin: 15px 0 0 20px; - align-self: start; - font-weight:400; - - } - - > p { - margin: 5px 0 0 -70px; - justify-self: start; - } -` \ No newline at end of file diff --git a/fitness-web/src/pages/Main.css b/fitness-web/src/pages/Main.css deleted file mode 100644 index d02a0da..0000000 --- a/fitness-web/src/pages/Main.css +++ /dev/null @@ -1,37 +0,0 @@ -/* Main.css */ - -.main-container { - display: flex; - background-color: #FF9549; - width: 70%; - height: 700px; - margin-left: 15%; - align-items: center; -} - -.centered-image { - position: absolute; - margin-top: 140px; -} -.centered-image2 { - position: absolute; - margin-left: 400px; -} -.centered-image3 { - position: fixed; - bottom: 0; - left: 0; - width: 100%; - text-align: center; - padding: 20px; - background-color: #f0f0f0; - z-index: 100; /* 이미지를 다른 컨텐츠 위에 표시하기 위해 z-index 추가 */ -} -.Sentence { - font-size: 40px; - color: white; - font-weight: 700; - margin-left: 120px; - margin-top: 300px; -} - diff --git a/fitness-web/src/pages/Main.jsx b/fitness-web/src/pages/Main.jsx deleted file mode 100644 index cb726e7..0000000 --- a/fitness-web/src/pages/Main.jsx +++ /dev/null @@ -1,20 +0,0 @@ -import React, { useEffect } from "react"; -import kangaroo from '../img/kangaroo.svg'; -import './Main.css'; // CSS 파일을 import - -const Main = () => { - - - return ( - <> -
- -
PT 하지말고
동네형에게 헬스과외 받자.
- Kangaroo Image - -
- - ); -}; - -export default Main; \ No newline at end of file diff --git a/fitness-web/src/pages/ModifyingCoach.jsx b/fitness-web/src/pages/ModifyingCoach.jsx deleted file mode 100644 index 9f68351..0000000 --- a/fitness-web/src/pages/ModifyingCoach.jsx +++ /dev/null @@ -1,560 +0,0 @@ -import React, { useState, useRef, useEffect } from "react"; -import "./ModifyingInformation.css"; -import { Icon } from "@iconify/react"; -import axios from "axios"; -import ModalSearch from "../components/modalsearch/ModalSearch"; -import { FaSearch } from "react-icons/fa"; -import ImgModal from "../components/imgModal/ImgModal"; - -export default function ModifyingCoach() { - const apiUrl = process.env.REACT_APP_API_URL; - const [nickname, setNickname] = useState(""); - const [age, setAge] = useState(""); - const [introduction, setIntroduction] = useState(""); - const [schedule, setSchedule] = useState(""); - const [price, setPrice] = useState(""); - const [comment, setComment] = useState(""); - const [searchResults, setSearchResults] = useState([]); - const [modalOpen, setModalOpen] = useState(false); - const [selectedGym, setSelectedGym] = useState(); - const [keyword, setKeyword] = useState(""); - const [albumImages, setAlbumImages] = useState([]); // 앨범이미지 저장 - const [newProfileImage, setNewProfileImage] = useState(null); - const [profilePictureUrl, setProfilePictureUrl] = useState(null); // 프로필 이미지 - const [isModalOpen, setIsModalOpen] = useState(false); - - const openModal = () => setIsModalOpen(true); - const closeModal = () => setIsModalOpen(false); - const token = localStorage.getItem("token"); - - useEffect(() => { - const fetchCoachInfo = async () => { - try { - const response = await axios.get(`${apiUrl}/coaches/my-info`, { - headers: { - token: token, - }, - }); - - // 서버로부터 받아온 데이터 - const coachInfoData = response.data; - - // 받아온 데이터를 활용하여 필요한 처리 수행 - console.log("Coach Info:", coachInfoData); - - // 받아온 코치 정보를 각 입력창에 설정 - setNickname(coachInfoData.result.nickname || ""); - setAge(coachInfoData.result.age || ""); - setIntroduction(coachInfoData.result.introduction || ""); - setSchedule(coachInfoData.result.schedule || ""); - setPrice(coachInfoData.result.price || ""); - setComment(coachInfoData.result.comment || ""); - setKeyword(coachInfoData.result.address || ""); - setSelectedGym({ - ...coachInfoData.result, - }); - - setProfilePictureUrl(coachInfoData.result.coachPicture); - - // 이미지 설정은 따로 로직을 추가해야 합니다. - setAlbumImages(coachInfoData.result.pictureURLs); // 예시일 뿐, 실제로는 파일 처리가 필요 - } catch (error) { - console.error("Error fetching coach info:", error); - - // 에러 처리 - if (error.response && error.response.data) { - console.error("서버 응답 데이터:", error.response.data); - } - } - }; - - fetchCoachInfo(); - }, []); - - const fullAddress = selectedGym - ? `${selectedGym.region} ${selectedGym.subAddress} ${selectedGym.detailAddress}` - : ""; - - const inputRef = useRef(null); - - const handleImageClick = () => { - if (inputRef.current) { - inputRef.current.click(); - } - }; - - const handleImageChange = (e) => { - const file = e.target.files[0]; - console.log(file); - setNewProfileImage(file); - }; - - const handleImgDelete = (e) => { - e.preventDefault(); // 기본 동작 방지 - // 이미지 미리보기 지우기 - setNewProfileImage(null); - - // 기존 프로필 이미지 URL 지우기 - setProfilePictureUrl(null); - }; - const handleAddImages = (event) => { - const imageFiles = event.target.files; - let imageFileObjects = [...albumImages]; - - for (let i = 0; i < imageFiles.length; i++) { - const currentImageFile = imageFiles[i]; - imageFileObjects.push(currentImageFile); - } - - imageFileObjects = imageFileObjects.slice(0, 6); - setAlbumImages(imageFileObjects); - - console.log("Selected Images:", imageFileObjects); - }; - - const handleDeleteAlbum = (id) => { - setAlbumImages((prevImages) => - prevImages.filter((_, index) => index !== id) - ); - }; - - const handleGymClick = (gym) => { - setSelectedGym(gym); - setKeyword( - `${gym.name} ${gym.region} ${gym.subAddress} ${gym.detailAddress}` - ); - setModalOpen(false); - }; - - const handleSearch = async (e) => { - if (e.key === "Enter") { - e.preventDefault(); - try { - const response = await axios.get( - `${apiUrl}/gym/search?keyword=${keyword}` - ); - setSearchResults(response.data.result); - setModalOpen(true); - } catch (error) { - console.error("Error fetching gym search results:", error); - } - } - }; - - const handleNicknameChange = (e) => setNickname(e.target.value); - const handleCommentChange = (e) => setComment(e.target.value); - const handleIntroductionChange = (e) => setIntroduction(e.target.value); - const handleScheduleChange = (e) => setSchedule(e.target.value); - const handlePriceChange = (e) => { - const inputValue = e.target.value; - // 숫자만 입력되도록 정규 표현식을 사용하여 확인 - if (/^\d*$/.test(inputValue)) { - setPrice(inputValue); - } -} - const handleAgeChange = (e) => setAge(e.target.value); - - const handleSubmit = async (e) => { - e.preventDefault(); - - const formData = new FormData(); - - formData.append( - "request", - JSON.stringify({ - nickname: nickname, - age: parseInt(age), - introduction: introduction, - schedule: schedule, - comment: comment, - address: fullAddress, - region: selectedGym.region, - subAddress: selectedGym.subAddress, - detailAddress: selectedGym.detailAddress, - price: parseInt(price), - }) - ); - - if (newProfileImage) { - formData.append( - "picture", - newProfileImage, - `@${newProfileImage.name};type=${newProfileImage.type}` - ); - } else if (profilePictureUrl) { - formData.append("picture", profilePictureUrl); - } else { - try { - const deleteresponse = await axios.delete( - // Changed from axios.put to axios.patch - `${apiUrl}/coaches/update/delete/image`, - { - headers: { - token: token, - "Content-Type": "multipart/form-data", - }, - } - ); - - console.log("Coach updated:", deleteresponse.data); - } catch (error) { - console.error("Error:", error); - console.error("에러 상세 정보:", error.deleteresponse); - - if (error.deleteresponse && error.deleteresponse.data) { - console.error("서버 응답 데이터:", error.deleteresponse.data); - } - } - } - - for (let i = 0; i < albumImages.length; i++) { - const file = albumImages[i]; - const blob = new Blob([file], { type: file.type }); - if (typeof file === "string") { - formData.append("albumURL", albumImages[i]); - console.log(albumImages[i]); - } else { - formData.append("albumFile", blob, `@${file.name};type=${file.type}`); - } - } - - try { - const response = await axios.patch( - // Changed from axios.put to axios.patch - `${apiUrl}/coaches/update`, - formData, - { - headers: { - token: token, - "Content-Type": "multipart/form-data", - }, - } - ); - - console.log("Coach updated:", response.data); - alert("수정이 완료됐습니다!"); - } catch (error) { - console.error("Error:", error); - console.error("에러 상세 정보:", error.response); - - if (error.response && error.response.data) { - console.error("서버 응답 데이터:", error.response.data); - } - - alert("등록에 실패했습니다"); - } - }; - - const textStyle = { - color: "#FF9549", - fontWeight: "bold", - textAlign: "left", - marginTop:"10px" - }; - - const boxStyle1 = { - backgroundColor: "#FFE0CA", - borderRadius: "10px", - border: "0px", - width: "600px", - height: "30px", - marginTop: "5px", - }; - - const boxStyle2 = { - resize: "none", - backgroundColor: "#FFE0CA", - borderRadius: "10px", - border: "0px", - width: "618px", - height: "100px", - marginTop: "5px", - fontWeight: "bold", - fontSize: "18px", - paddingLeft: "8px", - paddingTop: "8px", - }; - - const imageContainerStyle = { - display: "flex", - }; - - const emptyImageStyle = { - width: "70px", - height: "70px", - border: "3px dashed #cccccc", - margin: "5px", - borderRadius: "5px", - color: "#919191", - display: "flex", - alignItems: "center", - justifyContent: "center", - }; - - return ( -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-
내 정보 수정하기
-
-
- {newProfileImage ? ( - 새로운 프로필 - ) : profilePictureUrl ? ( - 기존 프로필 - ) : ( -
- -
- )} - -
-
-
닉네임
- -
-
나이
- -
-
선생님 소개
- -
-
주 운동 시간
- -
-
이용 가격 (시급)
- -
-
한 줄 인사말
- - - {/* 글자수 세기 */} -
-

{content.length}/1000

-
- - - {/* 이미지 처리 */} - {/* 이미지 선택 컴포넌트 */} - - {/* 후기 작성 버튼 */} -
- -
- - - ); -} - -export default Reviews; \ No newline at end of file diff --git a/fitness-web/src/pages/SearchPage.css b/fitness-web/src/pages/SearchPage.css deleted file mode 100644 index 1021422..0000000 --- a/fitness-web/src/pages/SearchPage.css +++ /dev/null @@ -1,18 +0,0 @@ -.SearchPage{ - display: flex; - margin-left: 21%; - margin-top: 0%; -} -.MapSection{ - margin-top: 4%; - margin-left: 100px; -} -.ListSection{ - margin-top: 70px; -} -.Spfirstline{ - display: flex; - flex-direction: column; - margin-top: 4%; -} - diff --git a/fitness-web/src/pages/SearchPage.jsx b/fitness-web/src/pages/SearchPage.jsx deleted file mode 100644 index eb35588..0000000 --- a/fitness-web/src/pages/SearchPage.jsx +++ /dev/null @@ -1,70 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import SearchSection from '../components/brosearch/SearchSection'; -import MapSection from '../components/brosearch/MapSection'; -import ListSection from '../components/brosearch/ListSection'; -import axios from 'axios'; -import './SearchPage.css'; -const SearchPage = () => { - - const [userList, setUserList] = useState([]); - - const [selectedRegion, setSelectedRegion] = useState(null); - const [selectedSubAddress, setSelectedSubAddress] = useState(null); - const [selectedUserId, setSelectedUserId] = useState(null); - - const apiUrl = process.env.REACT_APP_API_URL + "/coaches/search"; - - useEffect(() => { - - - - const fetchData = async () => { - try { - const response = await axios.get(apiUrl); - setUserList(response.data.result); // 변경된 부분 - } catch (error) { - console.error('Error fetching user list:', error); - } - }; - - fetchData(); - }, [apiUrl]); - - const handleRegionSelect = (region, subAddress) => { - setSelectedRegion(region); - setSelectedSubAddress(subAddress); - setSelectedUserId(null); - }; - - const handleMarkerClick = (userId) => { - setSelectedUserId(userId); - }; - - return ( -
-
-
- -
-
- -
-
-
- -
-
- ); -}; - -export default SearchPage; \ No newline at end of file