diff --git a/package-lock.json b/package-lock.json index 6efce73f..118b59e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,8 +11,7 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@hookform/resolvers": "^3.9.0", - "@mui/material": "^5.14.18", - "@mui/styled-engine-sc": "^6.0.0-alpha.6", + "@mui/material": "^6.1.9", "@reactour/mask": "^1.1.0", "@reactour/tour": "^3.7.0", "@sentry/nextjs": "^8.41.0", @@ -655,6 +654,10 @@ "version": "7.23.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", + "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -759,26 +762,40 @@ "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" }, "node_modules/@emotion/cache": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", - "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", + "version": "11.13.5", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.13.5.tgz", + "integrity": "sha512-Z3xbtJ+UcK76eWkagZ1onvn/wAVb1GOMuR15s30Fm2wrMgC7jzpnO2JZXr4eujTTqoQFUrZIw/rT0c6Zzjca1g==", + "license": "MIT", "dependencies": { - "@emotion/memoize": "^0.8.1", - "@emotion/sheet": "^1.2.2", - "@emotion/utils": "^1.2.1", - "@emotion/weak-memoize": "^0.3.1", + "@emotion/memoize": "^0.9.0", + "@emotion/sheet": "^1.4.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", "stylis": "4.2.0" } }, + "node_modules/@emotion/cache/node_modules/@emotion/memoize": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", + "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==", + "license": "MIT" + }, + "node_modules/@emotion/cache/node_modules/@emotion/weak-memoize": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", + "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==", + "license": "MIT" + }, "node_modules/@emotion/cache/node_modules/stylis": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" }, "node_modules/@emotion/hash": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", - "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", + "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==", + "license": "MIT" }, "node_modules/@emotion/is-prop-valid": { "version": "1.2.1", @@ -817,21 +834,35 @@ } }, "node_modules/@emotion/serialize": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz", - "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.3.tgz", + "integrity": "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==", + "license": "MIT", "dependencies": { - "@emotion/hash": "^0.9.1", - "@emotion/memoize": "^0.8.1", - "@emotion/unitless": "^0.8.1", - "@emotion/utils": "^1.2.1", + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/unitless": "^0.10.0", + "@emotion/utils": "^1.4.2", "csstype": "^3.0.2" } }, + "node_modules/@emotion/serialize/node_modules/@emotion/memoize": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", + "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==", + "license": "MIT" + }, + "node_modules/@emotion/serialize/node_modules/@emotion/unitless": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz", + "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==", + "license": "MIT" + }, "node_modules/@emotion/sheet": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", - "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz", + "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==", + "license": "MIT" }, "node_modules/@emotion/styled": { "version": "11.11.0", @@ -869,9 +900,10 @@ } }, "node_modules/@emotion/utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz", - "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==" + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.2.tgz", + "integrity": "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==", + "license": "MIT" }, "node_modules/@emotion/weak-memoize": { "version": "0.3.1", @@ -930,40 +962,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@floating-ui/core": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.0.tgz", - "integrity": "sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==", - "dependencies": { - "@floating-ui/utils": "^0.1.3" - } - }, - "node_modules/@floating-ui/dom": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.3.tgz", - "integrity": "sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==", - "dependencies": { - "@floating-ui/core": "^1.4.2", - "@floating-ui/utils": "^0.1.3" - } - }, - "node_modules/@floating-ui/react-dom": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.4.tgz", - "integrity": "sha512-CF8k2rgKeh/49UrnIBs4BdxPUV6vize/Db1d/YbCLyp9GiVZ0BEwf5AiDSxJRCr6yOkGqTFHtmrULxkEfYZ7dQ==", - "dependencies": { - "@floating-ui/dom": "^1.5.1" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, - "node_modules/@floating-ui/utils": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz", - "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" - }, "node_modules/@hookform/resolvers": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.9.0.tgz", @@ -1665,77 +1663,49 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@mui/base": { - "version": "5.0.0-beta.24", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.24.tgz", - "integrity": "sha512-bKt2pUADHGQtqWDZ8nvL2Lvg2GNJyd/ZUgZAJoYzRgmnxBL9j36MSlS3+exEdYkikcnvVafcBtD904RypFKb0w==", - "dependencies": { - "@babel/runtime": "^7.23.2", - "@floating-ui/react-dom": "^2.0.4", - "@mui/types": "^7.2.9", - "@mui/utils": "^5.14.18", - "@popperjs/core": "^2.11.8", - "clsx": "^2.0.0", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.14.18", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.18.tgz", - "integrity": "sha512-yFpF35fEVDV81nVktu0BE9qn2dD/chs7PsQhlyaV3EnTeZi9RZBuvoEfRym1/jmhJ2tcfeWXiRuHG942mQXJJQ==", + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.1.9.tgz", + "integrity": "sha512-TWqj7b1w5cmSz4H/uf+y2AHxAH4ldPR7D2bz0XVyn60GCAo/zRbRPx7cF8gTs/i7CiYeHzV6dtat0VpMwOtolw==", + "license": "MIT", "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui" + "url": "https://opencollective.com/mui-org" } }, "node_modules/@mui/material": { - "version": "5.14.18", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.18.tgz", - "integrity": "sha512-y3UiR/JqrkF5xZR0sIKj6y7xwuEiweh9peiN3Zfjy1gXWXhz5wjlaLdoxFfKIEBUFfeQALxr/Y8avlHH+B9lpQ==", - "dependencies": { - "@babel/runtime": "^7.23.2", - "@mui/base": "5.0.0-beta.24", - "@mui/core-downloads-tracker": "^5.14.18", - "@mui/system": "^5.14.18", - "@mui/types": "^7.2.9", - "@mui/utils": "^5.14.18", - "@types/react-transition-group": "^4.4.8", - "clsx": "^2.0.0", - "csstype": "^3.1.2", + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.1.9.tgz", + "integrity": "sha512-NwqIN0bdsgzSbZd5JFcC+2ez0XW/XNs8uiV2PDHrqQ4qf/FEasFJG1z6g8JbCN0YlTrHZekVb17X0Fv0qcYJfQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/core-downloads-tracker": "^6.1.9", + "@mui/system": "^6.1.9", + "@mui/types": "^7.2.19", + "@mui/utils": "^6.1.9", + "@popperjs/core": "^2.11.8", + "@types/react-transition-group": "^4.4.11", + "clsx": "^2.1.1", + "csstype": "^3.1.3", "prop-types": "^15.8.1", - "react-is": "^18.2.0", + "react-is": "^18.3.1", "react-transition-group": "^4.4.5" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui" + "url": "https://opencollective.com/mui-org" }, "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@mui/material-pigment-css": "^6.1.9", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { @@ -1744,35 +1714,40 @@ "@emotion/styled": { "optional": true }, + "@mui/material-pigment-css": { + "optional": true + }, "@types/react": { "optional": true } } }, "node_modules/@mui/material/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" }, "node_modules/@mui/private-theming": { - "version": "5.14.18", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.18.tgz", - "integrity": "sha512-WSgjqRlzfHU+2Rou3HlR2Gqfr4rZRsvFgataYO3qQ0/m6gShJN+lhVEvwEiJ9QYyVzMDvNpXZAcqp8Y2Vl+PAw==", + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.1.9.tgz", + "integrity": "sha512-7aum/O1RquBYhfwL/7egDyl9GqJgPM6hoJDFFBbhF6Sgv9yI9v4w3ArKUkuVvR0CtVj4NXRVMKEioh1bjUzvuA==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.2", - "@mui/utils": "^5.14.18", + "@babel/runtime": "^7.26.0", + "@mui/utils": "^6.1.9", "prop-types": "^15.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui" + "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -1781,26 +1756,29 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.14.18", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.14.18.tgz", - "integrity": "sha512-pW8bpmF9uCB5FV2IPk6mfbQCjPI5vGI09NOLhtGXPeph/4xIfC3JdIX0TILU0WcTs3aFQqo6s2+1SFgIB9rCXA==", + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.1.9.tgz", + "integrity": "sha512-xynSLlJRxHLzSfQaiDjkaTx8LiFb9ByVa7aOdwFnTxGWFMY1F+mkXwAUY4jDDE+MAxkWxlzzQE0wOohnsxhdQg==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.2", - "@emotion/cache": "^11.11.0", - "csstype": "^3.1.2", + "@babel/runtime": "^7.26.0", + "@emotion/cache": "^11.13.5", + "@emotion/serialize": "^1.3.3", + "@emotion/sheet": "^1.4.0", + "csstype": "^3.1.3", "prop-types": "^15.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui" + "url": "https://opencollective.com/mui-org" }, "peerDependencies": { "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "react": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { @@ -1811,53 +1789,33 @@ } } }, - "node_modules/@mui/styled-engine-sc": { - "version": "6.0.0-alpha.6", - "resolved": "https://registry.npmjs.org/@mui/styled-engine-sc/-/styled-engine-sc-6.0.0-alpha.6.tgz", - "integrity": "sha512-gLES93s5AyZss2EOGBpUF5YNtjbCnRAN1csuFMs8eRnFsQdJGPOdLF1SwgTvOmGDM3JFuGOEOE2XEVuvjhnoUw==", - "dependencies": { - "@babel/runtime": "^7.23.2", - "csstype": "^3.1.2", - "hoist-non-react-statics": "^3.3.2", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "styled-components": "^6.0.0" - } - }, "node_modules/@mui/system": { - "version": "5.14.18", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.18.tgz", - "integrity": "sha512-hSQQdb3KF72X4EN2hMEiv8EYJZSflfdd1TRaGPoR7CIAG347OxCslpBUwWngYobaxgKvq6xTrlIl+diaactVww==", - "dependencies": { - "@babel/runtime": "^7.23.2", - "@mui/private-theming": "^5.14.18", - "@mui/styled-engine": "^5.14.18", - "@mui/types": "^7.2.9", - "@mui/utils": "^5.14.18", - "clsx": "^2.0.0", - "csstype": "^3.1.2", + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.1.9.tgz", + "integrity": "sha512-8x+RucnNp21gfFYsklCaZf0COXbv3+v0lrVuXONxvPEkESi2rwLlOi8UPJfcz6LxZOAX3v3oQ7qw18vnpgueRg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/private-theming": "^6.1.9", + "@mui/styled-engine": "^6.1.9", + "@mui/types": "^7.2.19", + "@mui/utils": "^6.1.9", + "clsx": "^2.1.1", + "csstype": "^3.1.3", "prop-types": "^15.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui" + "url": "https://opencollective.com/mui-org" }, "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { @@ -1872,11 +1830,12 @@ } }, "node_modules/@mui/types": { - "version": "7.2.9", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.9.tgz", - "integrity": "sha512-k1lN/PolaRZfNsRdAqXtcR71sTnv3z/VCCGPxU8HfdftDkzi335MdJ6scZxvofMAd/K/9EbzCZTFBmlNpQVdCg==", + "version": "7.2.19", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.19.tgz", + "integrity": "sha512-6XpZEM/Q3epK9RN8ENoXuygnqUQxE+siN/6rGRi2iwJPgBUR25mphYQ9ZI87plGh58YoZ5pp40bFvKYOCDJ3tA==", + "license": "MIT", "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -1885,25 +1844,28 @@ } }, "node_modules/@mui/utils": { - "version": "5.14.18", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.18.tgz", - "integrity": "sha512-HZDRsJtEZ7WMSnrHV9uwScGze4wM/Y+u6pDVo+grUjt5yXzn+wI8QX/JwTHh9YSw/WpnUL80mJJjgCnWj2VrzQ==", + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.1.9.tgz", + "integrity": "sha512-N7uzBp7p2or+xanXn3aH2OTINC6F/Ru/U8h6amhRZEev8bJhKN86rIDIoxZZ902tj+09LXtH83iLxFMjMHyqNA==", + "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.2", - "@types/prop-types": "^15.7.10", + "@babel/runtime": "^7.26.0", + "@mui/types": "^7.2.19", + "@types/prop-types": "^15.7.13", + "clsx": "^2.1.1", "prop-types": "^15.8.1", - "react-is": "^18.2.0" + "react-is": "^18.3.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui" + "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -1912,9 +1874,10 @@ } }, "node_modules/@mui/utils/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" }, "node_modules/@next/env": { "version": "13.5.4", @@ -3132,6 +3095,7 @@ "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" @@ -4350,9 +4314,10 @@ } }, "node_modules/@types/prop-types": { - "version": "15.7.11", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", - "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" + "version": "15.7.13", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", + "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", + "license": "MIT" }, "node_modules/@types/react": { "version": "18.2.28", @@ -4374,9 +4339,10 @@ } }, "node_modules/@types/react-transition-group": { - "version": "4.4.9", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.9.tgz", - "integrity": "sha512-ZVNmWumUIh5NhH8aMD9CR2hdW0fNuYInlocZHaZ+dgk/1K49j1w/HoAuK1ki+pgscQrOFRTlXeoURtuzEkV3dg==", + "version": "4.4.11", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.11.tgz", + "integrity": "sha512-RM05tAniPZ5DZPzzNFP+DmrcOdD0efDUxMy3145oljWSl3x9ZV5vhme98gTxFrj2lhXvmGNnUiuDyJgY9IKkNA==", + "license": "MIT", "dependencies": { "@types/react": "*" } @@ -5544,9 +5510,10 @@ } }, "node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -5738,9 +5705,10 @@ } }, "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==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "license": "MIT" }, "node_modules/damerau-levenshtein": { "version": "1.0.8", @@ -5881,6 +5849,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.8.7", "csstype": "^3.0.2" @@ -9844,6 +9813,7 @@ "version": "4.4.5", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "license": "BSD-3-Clause", "dependencies": { "@babel/runtime": "^7.5.5", "dom-helpers": "^5.0.1", diff --git a/package.json b/package.json index 59f355a0..e93b1a62 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,7 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@hookform/resolvers": "^3.9.0", - "@mui/material": "^5.14.18", - "@mui/styled-engine-sc": "^6.0.0-alpha.6", + "@mui/material": "^6.1.9", "@reactour/mask": "^1.1.0", "@reactour/tour": "^3.7.0", "@sentry/nextjs": "^8.41.0", diff --git a/src/api/api.ts b/src/api/api.ts index 7563663f..d43513d8 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -1,7 +1,8 @@ import useAuth from '@/hooks/useAuth'; import findExCode from '@/utils/findExCode'; import axios, { InternalAxiosRequestConfig } from 'axios'; -import { sendServerErrorMsgToSlack } from './slack/sendSeverError'; +import { captureException } from '@sentry/nextjs'; +import { useToast } from '@/hooks/useToast'; const withAuthInstance = axios.create({ baseURL: process.env.NEXT_PUBLIC_SERVER_URL, @@ -31,10 +32,21 @@ withAuthInstance.interceptors.request.use( withAuthInstance.interceptors.response.use( (res) => { const { removeTokens } = useAuth(); + const { addToast } = useToast(); if (findExCode(res.data.code)) { + captureException(res.data.code, { + level: 'error', + extra: { + header: res.config.headers, + request: res.request, + type: 'Network Error!', + }, + }); removeTokens(); - alert(res.data.message); - sendServerErrorMsgToSlack(res); + addToast({ + status: 'error', + message: res.data.message, + }); if (typeof window !== 'undefined') { window.location.reload(); @@ -52,10 +64,6 @@ withAuthInstance.interceptors.response.use( withOutAuthInstance.interceptors.response.use( (res) => { - if (findExCode(res.data.code)) { - sendServerErrorMsgToSlack(res); - } - return res; }, (error) => { diff --git a/src/api/auth/signup/signupUser.ts b/src/api/auth/signup/signupUser.ts new file mode 100644 index 00000000..81ae48e6 --- /dev/null +++ b/src/api/auth/signup/signupUser.ts @@ -0,0 +1,43 @@ +import { ResponseModel } from '@/api/model'; +import { withAuthInstance } from '@/api/api'; +import findExCode from '@/utils/findExCode'; + +interface SignUpUserRequest { + socialId: number; + phoneNumber: string; + nickName: string; + marketingReceive: boolean; +} + +interface SignUpUserResponse extends ResponseModel { + data: { + accessToken: string; + accessExpiration: number; + refreshToken: string; + refreshExpiration: number; + role: 'ADMIN' | 'USER' | 'SENIOR'; + isTutorial: boolean; + }; +} + +export const signupUser = async ({ + socialId, + phoneNumber, + nickName, + marketingReceive, +}: SignUpUserRequest) => { + const response = ( + await withAuthInstance.post('/auth/user/signup', { + socialId, + phoneNumber, + nickName, + marketingReceive, + }) + ).data; + + if (findExCode(response.code)) { + throw new Error(response.message); + } + + return response.data; +}; diff --git "a/src/api/mentoring/\bconfirmSeniorMentoring.ts" b/src/api/mentoring/confirmSeniorMentoring.ts similarity index 100% rename from "src/api/mentoring/\bconfirmSeniorMentoring.ts" rename to src/api/mentoring/confirmSeniorMentoring.ts diff --git a/src/app/add-chat-link/page.tsx b/src/app/add-chat-link/page.tsx index 68d9c3e1..53b211d4 100644 --- a/src/app/add-chat-link/page.tsx +++ b/src/app/add-chat-link/page.tsx @@ -1,7 +1,7 @@ 'use client'; import ProgressBar from '@/components/Bar/ProgressBar'; -import BackHeader from '@/components/Header/BackHeader'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import BackHeader from '@/components/common/Header/BackHeader'; +import SingleValidator from '@/components/common/SingleValidator'; import { PROFILE_DIRECTION, PROFILE_PLACEHOLDER, diff --git a/src/app/add-profile/page.tsx b/src/app/add-profile/page.tsx index 41e90e67..356a2d70 100644 --- a/src/app/add-profile/page.tsx +++ b/src/app/add-profile/page.tsx @@ -3,12 +3,12 @@ import ProgressBar from '@/components/Bar/ProgressBar'; import { addProfileSchema } from '@/app/add-profile/schema'; -import BackHeader from '@/components/Header/BackHeader'; +import BackHeader from '@/components/common/Header/BackHeader'; import { FieldError, useForm } from 'react-hook-form'; import { yupResolver } from '@hookform/resolvers/yup'; -import ProfileForm from '@/components/SingleForm/ProfileForm'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import ProfileForm from '@/components/Form/ProfileForm'; +import SingleValidator from '@/components/common/SingleValidator'; import { PROFILE_DIRECTION, diff --git a/src/app/add-time/page.tsx b/src/app/add-time/page.tsx index e26409e9..b899f766 100644 --- a/src/app/add-time/page.tsx +++ b/src/app/add-time/page.tsx @@ -1,8 +1,8 @@ 'use client'; import ProgressBar from '@/components/Bar/ProgressBar'; -import BackHeader from '@/components/Header/BackHeader'; -import Scheduler from '@/components/Scheduler'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import BackHeader from '@/components/common/Header/BackHeader'; +import Scheduler from '@/components/domain/mentoring/Scheduler'; +import SingleValidator from '@/components/common/SingleValidator'; import { PROFILE_DIRECTION, PROFILE_SUB_DIRECTION, diff --git a/src/app/apply-wanted-senior/(components)/(modal)/WishSeniorApplyAgreeModal.tsx b/src/app/apply-wanted-senior/(components)/(modal)/WishSeniorApplyAgreeModal.tsx index aa7aba99..5c2e2771 100644 --- a/src/app/apply-wanted-senior/(components)/(modal)/WishSeniorApplyAgreeModal.tsx +++ b/src/app/apply-wanted-senior/(components)/(modal)/WishSeniorApplyAgreeModal.tsx @@ -1,6 +1,6 @@ import { useEffect, useRef, useState } from 'react'; import Image from 'next/image'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; import { useOutSideClick } from '@/hooks/useOutsideClick'; import { styled } from 'styled-components'; diff --git a/src/app/apply-wanted-senior/(components)/(steps)/Field.tsx b/src/app/apply-wanted-senior/(components)/(steps)/Field.tsx index 93feaef1..3a9b9638 100644 --- a/src/app/apply-wanted-senior/(components)/(steps)/Field.tsx +++ b/src/app/apply-wanted-senior/(components)/(steps)/Field.tsx @@ -6,7 +6,7 @@ import { } from '../../constant'; import { WishSeniorSubTitle, WishSeniorTitle, NextBtnBox } from '../(template)'; import { parseAsJson, useQueryState } from 'nuqs'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; import * as y from 'yup'; const schema = y.object({ @@ -38,7 +38,10 @@ export function WishSeniorField({ {WISH_SENIOR_PROVIDER_FIELD_LIST.map((option) => ( - + handleFieldChange(option, '')} + > handleFieldChange(option, '')} - onClick={() => handleFieldChange(option, '')} - /> - handleFieldChange(option, '')} - $isChecked={field?.type === option} /> + ))} @@ -59,6 +58,7 @@ export function WishSeniorField({ style={{ border: field?.type === WISH_SENIOR_FIELD_ETC ? 'none' : '', }} + onClick={() => handleFieldChange(WISH_SENIOR_FIELD_ETC, '')} > handleFieldChange(WISH_SENIOR_FIELD_ETC, e.target.value) @@ -81,7 +82,6 @@ export function WishSeniorField({ ) : ( <> handleFieldChange(WISH_SENIOR_FIELD_ETC, '')} $isChecked={field?.type === WISH_SENIOR_FIELD_ETC} /> @@ -171,4 +171,3 @@ const EtcInput = styled.input` padding-left: 4px; height: 45px; `; - diff --git a/src/app/apply-wanted-senior/(components)/(steps)/Info.tsx b/src/app/apply-wanted-senior/(components)/(steps)/Info.tsx index 26eb2b79..00155d0c 100644 --- a/src/app/apply-wanted-senior/(components)/(steps)/Info.tsx +++ b/src/app/apply-wanted-senior/(components)/(steps)/Info.tsx @@ -1,7 +1,7 @@ import Image from 'next/image'; import styled from 'styled-components'; import { WISH_SENIOR_MENTOR_MSG } from '../../constant'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; import { WishSeniorTitle, WishSeniorSubTitle, NextBtnBox } from '../(template)'; export function WishSeniorInfo({ onClick }: { onClick: () => void }) { diff --git a/src/app/apply-wanted-senior/(components)/(steps)/Lab.tsx b/src/app/apply-wanted-senior/(components)/(steps)/Lab.tsx index e69b07cf..34ca0928 100644 --- a/src/app/apply-wanted-senior/(components)/(steps)/Lab.tsx +++ b/src/app/apply-wanted-senior/(components)/(steps)/Lab.tsx @@ -1,9 +1,9 @@ import styled from 'styled-components'; import { WISH_SENIOR_MENTOR_MSG } from '../../constant'; import { NextBtnBox, WishSeniorSubTitle, WishSeniorTitle } from '../(template)'; -import TextForm from '@/components/SingleForm/TextForm'; +import TextForm from '@/components/Form/TextForm'; import { useForm } from 'react-hook-form'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; export function WishSeniorLab({ onClick }: { onClick: (lab: string) => void }) { const { register, getValues } = useForm({ diff --git a/src/app/apply-wanted-senior/(components)/(steps)/Phone.tsx b/src/app/apply-wanted-senior/(components)/(steps)/Phone.tsx index 501f0e57..2f4806d8 100644 --- a/src/app/apply-wanted-senior/(components)/(steps)/Phone.tsx +++ b/src/app/apply-wanted-senior/(components)/(steps)/Phone.tsx @@ -1,12 +1,12 @@ import styled from 'styled-components'; import { WISH_SENIOR_MENTOR_MSG } from '../../constant'; import { NextBtnBox, WishSeniorSubTitle, WishSeniorTitle } from '../(template)'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; import { useForm } from 'react-hook-form'; import { yupResolver } from '@hookform/resolvers/yup'; -import { phoneNumSchema } from '@/components/SingleForm/PhoneNumForm/phoneNumSchema'; -import TextForm from '@/components/SingleForm/TextForm'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import { phoneNumSchema } from '@/components/Form/PhoneNumForm/phoneNumSchema'; +import TextForm from '@/components/Form/TextForm'; +import SingleValidator from '@/components/common/SingleValidator'; import { useEffect } from 'react'; export function WishSeniorPhoneNum({ @@ -18,7 +18,6 @@ export function WishSeniorPhoneNum({ register, getValues, formState: { errors }, - trigger, } = useForm({ defaultValues: { phoneNum: '', @@ -27,9 +26,6 @@ export function WishSeniorPhoneNum({ resolver: yupResolver(phoneNumSchema), }); - useEffect(() => { - trigger(); - }, []); return (
{WISH_SENIOR_MENTOR_MSG.PHONE.TITLE} @@ -40,8 +36,8 @@ export function WishSeniorPhoneNum({ void; }) { - const { register, getValues } = useForm({ - defaultValues: { - postgradu: '', - }, - mode: 'onChange', - }); + const postgradu = useAtomValue(sPostGraduAtom); return (
@@ -28,10 +26,14 @@ export function WishSeniorPostGradu({ - + overlay.open(({ unmount }) => ( + + )) + } /> @@ -39,7 +41,7 @@ export function WishSeniorPostGradu({ onClick(getValues('postgradu'))} + onClick={() => onClick(postgradu)} />
diff --git a/src/app/apply-wanted-senior/(components)/(steps)/Professor.tsx b/src/app/apply-wanted-senior/(components)/(steps)/Professor.tsx index 5b106713..c1caa62a 100644 --- a/src/app/apply-wanted-senior/(components)/(steps)/Professor.tsx +++ b/src/app/apply-wanted-senior/(components)/(steps)/Professor.tsx @@ -1,9 +1,9 @@ import styled from 'styled-components'; import { WISH_SENIOR_MENTOR_MSG } from '../../constant'; import { NextBtnBox, WishSeniorSubTitle, WishSeniorTitle } from '../(template)'; -import TextForm from '@/components/SingleForm/TextForm'; +import TextForm from '@/components/Form/TextForm'; import { useForm } from 'react-hook-form'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; export function WishSeniorProfessor({ onClick, diff --git a/src/app/apply-wanted-senior/(components)/(steps)/Submit.tsx b/src/app/apply-wanted-senior/(components)/(steps)/Submit.tsx index bc79ec71..ba37e639 100644 --- a/src/app/apply-wanted-senior/(components)/(steps)/Submit.tsx +++ b/src/app/apply-wanted-senior/(components)/(steps)/Submit.tsx @@ -1,6 +1,6 @@ -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; import { WishSeniorSubTitle, WishSeniorTitle } from '../(template)'; -import { BtnStyleNonM } from '@/components/Button/NextBtn/NextBtn.styled'; +import { BtnStyleNonM } from '@/components/common/Button/NextBtn/NextBtn.styled'; import Image from 'next/image'; interface ApplyWantedSeniorSubmitProp { @@ -61,4 +61,3 @@ export function ApplyWantedSeniorSubmit({
); } - diff --git a/src/app/apply-wanted-senior/page.tsx b/src/app/apply-wanted-senior/page.tsx index b15b9162..2ce83ddd 100644 --- a/src/app/apply-wanted-senior/page.tsx +++ b/src/app/apply-wanted-senior/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import BackHeader from '@/components/Header/BackHeader'; +import BackHeader from '@/components/common/Header/BackHeader'; import useFunnel from '@/hooks/useFunnel'; import { WishSeniorInfo, @@ -13,7 +13,6 @@ import { } from './(components)/(steps)'; import { useWishSeniorApply } from '@/hooks/mutations/useWishSeniorApply'; import { useRouter } from 'next/navigation'; -import styled from 'styled-components'; import { overlay } from 'overlay-kit'; import { useState } from 'react'; import type { WishSeniorApplyRequest } from '@/api/senior/wishSeniorApply'; @@ -146,4 +145,3 @@ export default function ApplyWantedSeniorPage() { ); } - diff --git a/src/app/junior/mentoring/page.tsx b/src/app/junior/mentoring/page.tsx index de379679..180ff545 100644 --- a/src/app/junior/mentoring/page.tsx +++ b/src/app/junior/mentoring/page.tsx @@ -10,7 +10,7 @@ const TabBar = dynamic( import React, { useEffect } from 'react'; import styled from 'styled-components'; import MenuBar from '@/components/Bar/MenuBar'; -import LogoLayer from '@/components/LogoLayer/LogoLayer'; +import LogoLayer from '@/components/common/LogoLayer/LogoLayer'; import SearchModal from '@/components/Modal/SearchModal'; import { overlay } from 'overlay-kit'; import useAuth from '@/hooks/useAuth'; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 8946756f..6f534110 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,10 +2,12 @@ import './globals.css'; import type { Metadata } from 'next'; import Providers from '@/components/Provider/providers'; import StyledComponentsRegistry from '@/lib/registry'; -import GTMAnalytics from '@/components/GA/GTM'; -import GoogleAnalytics from '@/components/GA/GA'; + import { SERVICE_METADATA } from '@/constants/meta/metaData'; import OverlayKitProvider from '@/lib/overlay'; +import GA from '@/components/common/GA/GA'; +import GTM from '@/components/common/GA/GTM'; +import { ToastProvider } from '@/components/common/Toast/ToastProvider'; export const metadata: Metadata = { title: SERVICE_METADATA.title, @@ -67,8 +69,8 @@ export default function RootLayout({ /> - {process.env.NEXT_PUBLIC_GTM_ID ? : <>} - {process.env.NEXT_PUBLIC_GA4_ID ? : <>} + {process.env.NEXT_PUBLIC_GTM_ID ? : <>} + {process.env.NEXT_PUBLIC_GA4_ID ? : <>} @@ -80,6 +82,7 @@ export default function RootLayout({
+
diff --git a/src/app/login/oauth2/code/kakao/page.tsx b/src/app/login/oauth2/code/kakao/page.tsx index ca8b1719..6efbc20d 100644 --- a/src/app/login/oauth2/code/kakao/page.tsx +++ b/src/app/login/oauth2/code/kakao/page.tsx @@ -2,7 +2,7 @@ import React from 'react'; import styled from 'styled-components'; -import Spinner from '@/components/Spinner'; +import Spinner from '@/components/common/Spinner'; import useKakaoLogin from '@/hooks/useKakaoLogin'; function KakaoPage() { diff --git a/src/components/SelectTime/SelectTime.styled.ts b/src/app/mentoring-apply/[seniorId]/(components)/SelectTime/SelectTime.styled.ts similarity index 100% rename from src/components/SelectTime/SelectTime.styled.ts rename to src/app/mentoring-apply/[seniorId]/(components)/SelectTime/SelectTime.styled.ts diff --git a/src/components/SelectTime/SelectTime.tsx b/src/app/mentoring-apply/[seniorId]/(components)/SelectTime/SelectTime.tsx similarity index 97% rename from src/components/SelectTime/SelectTime.tsx rename to src/app/mentoring-apply/[seniorId]/(components)/SelectTime/SelectTime.tsx index cdccf0e2..ab82e5ba 100644 --- a/src/components/SelectTime/SelectTime.tsx +++ b/src/app/mentoring-apply/[seniorId]/(components)/SelectTime/SelectTime.tsx @@ -7,7 +7,7 @@ import { SelectTimeWrapper, } from './SelectTime.styled'; import Image from 'next/image'; -import down_arrow from '../../../public/arrow-down.png'; +import down_arrow from '../../../../../../public/arrow-down.png'; import { useAtomValue } from 'jotai'; import { useEffect, useState } from 'react'; import { MENTORING_SCHEDULE } from '@/constants/form/cMentoringApply'; diff --git a/src/components/SelectTime/index.tsx b/src/app/mentoring-apply/[seniorId]/(components)/SelectTime/index.tsx similarity index 100% rename from src/components/SelectTime/index.tsx rename to src/app/mentoring-apply/[seniorId]/(components)/SelectTime/index.tsx diff --git a/src/components/Box/TimeListBox/TimeListBox.styled.ts b/src/app/mentoring-apply/[seniorId]/(components)/TimeListBox/TimeListBox.styled.ts similarity index 100% rename from src/components/Box/TimeListBox/TimeListBox.styled.ts rename to src/app/mentoring-apply/[seniorId]/(components)/TimeListBox/TimeListBox.styled.ts diff --git a/src/components/Box/TimeListBox/TimeListBox.tsx b/src/app/mentoring-apply/[seniorId]/(components)/TimeListBox/TimeListBox.tsx similarity index 100% rename from src/components/Box/TimeListBox/TimeListBox.tsx rename to src/app/mentoring-apply/[seniorId]/(components)/TimeListBox/TimeListBox.tsx diff --git a/src/components/Box/TimeListBox/index.tsx b/src/app/mentoring-apply/[seniorId]/(components)/TimeListBox/index.tsx similarity index 100% rename from src/components/Box/TimeListBox/index.tsx rename to src/app/mentoring-apply/[seniorId]/(components)/TimeListBox/index.tsx diff --git a/src/components/JQ/loader.js b/src/app/mentoring-apply/[seniorId]/pay/(components)/JQ/loader.js similarity index 100% rename from src/components/JQ/loader.js rename to src/app/mentoring-apply/[seniorId]/pay/(components)/JQ/loader.js diff --git a/src/app/mentoring-apply/[seniorId]/pay/page.js b/src/app/mentoring-apply/[seniorId]/pay/page.js index 4a58928b..972e2738 100644 --- a/src/app/mentoring-apply/[seniorId]/pay/page.js +++ b/src/app/mentoring-apply/[seniorId]/pay/page.js @@ -1,12 +1,12 @@ 'use client'; import ProgressBar from '@/components/Bar/ProgressBar'; -import BackHeader from '@/components/Header/BackHeader'; -import RoundedImage from '@/components/Image/RoundedImage'; +import BackHeader from '@/components/common/Header/BackHeader'; +import RoundedImage from '@/components/common/RoundedImage'; import styled from 'styled-components'; import user_icon from '../../../../../public/user.png'; -import AuthLabeledText from '@/components/Text/AuthLabeledText'; +import AuthLabeledText from '@/components/common/Text/AuthLabeledText'; import { useAtom, useAtomValue } from 'jotai'; -import '../../../../components/JQ/loader'; +import './(components)/JQ/loader'; import { PhoneNumberAtom, paySeniorIdAtom, diff --git a/src/app/mentoring-apply/[seniorId]/question/page.tsx b/src/app/mentoring-apply/[seniorId]/question/page.tsx index 5ff12632..079fe185 100644 --- a/src/app/mentoring-apply/[seniorId]/question/page.tsx +++ b/src/app/mentoring-apply/[seniorId]/question/page.tsx @@ -1,9 +1,8 @@ 'use client'; import ProgressBar from '@/components/Bar/ProgressBar'; -import GoogleAnalytics from '@/components/GA/GA'; -import BackHeader from '@/components/Header/BackHeader'; +import BackHeader from '@/components/common/Header/BackHeader'; import ShortRiseUpModal from '@/components/Modal/ShortRiseUpModal'; -import TextareaForm from '@/components/SingleForm/TextareaForm'; +import TextareaForm from '@/components/Form/TextareaForm'; import { MENTORING_NOTICE, MENTORING_QUESTION, diff --git a/src/app/mentoring-apply/[seniorId]/schedule/page.tsx b/src/app/mentoring-apply/[seniorId]/schedule/page.tsx index 3f10c27e..183fda3e 100644 --- a/src/app/mentoring-apply/[seniorId]/schedule/page.tsx +++ b/src/app/mentoring-apply/[seniorId]/schedule/page.tsx @@ -1,9 +1,8 @@ 'use client'; import ProgressBar from '@/components/Bar/ProgressBar'; -import TimeListBox from '@/components/Box/TimeListBox'; -import GoogleAnalytics from '@/components/GA/GA'; -import BackHeader from '@/components/Header/BackHeader'; -import SelectTime from '@/components/SelectTime'; +import TimeListBox from '../(components)/TimeListBox'; +import BackHeader from '@/components/common/Header/BackHeader'; +import SelectTime from '../(components)/SelectTime'; import { MENTORING_SCHEDULE } from '@/constants/form/cMentoringApply'; import useAuth from '@/hooks/useAuth'; import { diff --git a/src/components/NotLogin/NotLmypage/NotLmypage.styled.ts b/src/app/mypage/(components)/NotLogin/NotLmypage/NotLmypage.styled.ts similarity index 100% rename from src/components/NotLogin/NotLmypage/NotLmypage.styled.ts rename to src/app/mypage/(components)/NotLogin/NotLmypage/NotLmypage.styled.ts diff --git a/src/components/NotLogin/NotLmypage/NotLmypage.tsx b/src/app/mypage/(components)/NotLogin/NotLmypage/NotLmypage.tsx similarity index 100% rename from src/components/NotLogin/NotLmypage/NotLmypage.tsx rename to src/app/mypage/(components)/NotLogin/NotLmypage/NotLmypage.tsx diff --git a/src/components/NotLogin/NotLmypage/index.tsx b/src/app/mypage/(components)/NotLogin/NotLmypage/index.tsx similarity index 100% rename from src/components/NotLogin/NotLmypage/index.tsx rename to src/app/mypage/(components)/NotLogin/NotLmypage/index.tsx diff --git a/src/components/Profile/Profile.styled.ts b/src/app/mypage/(components)/Profile/Profile.styled.ts similarity index 100% rename from src/components/Profile/Profile.styled.ts rename to src/app/mypage/(components)/Profile/Profile.styled.ts diff --git a/src/components/Profile/Profile.tsx b/src/app/mypage/(components)/Profile/Profile.tsx similarity index 96% rename from src/components/Profile/Profile.tsx rename to src/app/mypage/(components)/Profile/Profile.tsx index 3fbfd2ef..ee370def 100644 --- a/src/components/Profile/Profile.tsx +++ b/src/app/mypage/(components)/Profile/Profile.tsx @@ -11,7 +11,7 @@ import { ImageBox, } from './Profile.styled'; import { ProfileProps } from '@/types/profile/profile'; -import user_icon from '../../../public/user.png'; +import user_icon from '../../../../../public/user.png'; function Profile(props: ProfileProps) { return ( diff --git a/src/components/Profile/ProfileManage/JuniorManage/JuniorManage.styled.ts b/src/app/mypage/(components)/Profile/ProfileManage/JuniorManage/JuniorManage.styled.ts similarity index 100% rename from src/components/Profile/ProfileManage/JuniorManage/JuniorManage.styled.ts rename to src/app/mypage/(components)/Profile/ProfileManage/JuniorManage/JuniorManage.styled.ts diff --git a/src/components/Profile/ProfileManage/JuniorManage/JuniorManage.tsx b/src/app/mypage/(components)/Profile/ProfileManage/JuniorManage/JuniorManage.tsx similarity index 91% rename from src/components/Profile/ProfileManage/JuniorManage/JuniorManage.tsx rename to src/app/mypage/(components)/Profile/ProfileManage/JuniorManage/JuniorManage.tsx index bf4865c8..7dec4c38 100644 --- a/src/components/Profile/ProfileManage/JuniorManage/JuniorManage.tsx +++ b/src/app/mypage/(components)/Profile/ProfileManage/JuniorManage/JuniorManage.tsx @@ -1,6 +1,6 @@ import { JuniorManageContainer } from './JuniorManage.styled'; -import ContentComponent from '../../Box/ContentBox'; -import TitleComponent from '../../Box/TitleBox'; +import ContentComponent from '../../../ProfileStateChange/ContentBox'; +import TitleComponent from '../../../ProfileStateChange/TitleBox'; import { useRouter } from 'next/navigation'; import { NotSeniorProps } from '@/types/modal/mypage'; @@ -49,4 +49,3 @@ function JuniorManage(props: NotSeniorProps) { } export default JuniorManage; - diff --git a/src/components/Profile/ProfileManage/JuniorManage/index.tsx b/src/app/mypage/(components)/Profile/ProfileManage/JuniorManage/index.tsx similarity index 100% rename from src/components/Profile/ProfileManage/JuniorManage/index.tsx rename to src/app/mypage/(components)/Profile/ProfileManage/JuniorManage/index.tsx diff --git a/src/components/Profile/ProfileManage/ProfileManage.styled.ts b/src/app/mypage/(components)/Profile/ProfileManage/ProfileManage.styled.ts similarity index 100% rename from src/components/Profile/ProfileManage/ProfileManage.styled.ts rename to src/app/mypage/(components)/Profile/ProfileManage/ProfileManage.styled.ts diff --git a/src/components/Profile/ProfileManage/ProfileManage.tsx b/src/app/mypage/(components)/Profile/ProfileManage/ProfileManage.tsx similarity index 100% rename from src/components/Profile/ProfileManage/ProfileManage.tsx rename to src/app/mypage/(components)/Profile/ProfileManage/ProfileManage.tsx diff --git a/src/components/Profile/ProfileManage/SeniorManage/SeniorManage.styled.ts b/src/app/mypage/(components)/Profile/ProfileManage/SeniorManage/SeniorManage.styled.ts similarity index 100% rename from src/components/Profile/ProfileManage/SeniorManage/SeniorManage.styled.ts rename to src/app/mypage/(components)/Profile/ProfileManage/SeniorManage/SeniorManage.styled.ts diff --git a/src/components/Profile/ProfileManage/SeniorManage/SeniorManage.tsx b/src/app/mypage/(components)/Profile/ProfileManage/SeniorManage/SeniorManage.tsx similarity index 96% rename from src/components/Profile/ProfileManage/SeniorManage/SeniorManage.tsx rename to src/app/mypage/(components)/Profile/ProfileManage/SeniorManage/SeniorManage.tsx index ff09c75f..b2f22657 100644 --- a/src/components/Profile/ProfileManage/SeniorManage/SeniorManage.tsx +++ b/src/app/mypage/(components)/Profile/ProfileManage/SeniorManage/SeniorManage.tsx @@ -3,8 +3,8 @@ import { SeniorManageContentContainer, } from './SeniorManage.styled'; import { useUpdateRoleToJunior } from '@/hooks/mutations/useUpdateJunior'; -import ContentComponent from '../../Box/ContentBox'; -import TitleComponent from '../../Box/TitleBox'; +import ContentComponent from '../../../ProfileStateChange/ContentBox'; +import TitleComponent from '../../../ProfileStateChange/TitleBox'; import { SeniorManageProps } from '@/types/profile/seniorManage'; import Router, { useRouter } from 'next/navigation'; diff --git a/src/components/Profile/ProfileManage/SeniorManage/index.tsx b/src/app/mypage/(components)/Profile/ProfileManage/SeniorManage/index.tsx similarity index 100% rename from src/components/Profile/ProfileManage/SeniorManage/index.tsx rename to src/app/mypage/(components)/Profile/ProfileManage/SeniorManage/index.tsx diff --git a/src/components/Profile/ProfileManage/index.tsx b/src/app/mypage/(components)/Profile/ProfileManage/index.tsx similarity index 100% rename from src/components/Profile/ProfileManage/index.tsx rename to src/app/mypage/(components)/Profile/ProfileManage/index.tsx diff --git a/src/components/Profile/index.tsx b/src/app/mypage/(components)/Profile/index.tsx similarity index 100% rename from src/components/Profile/index.tsx rename to src/app/mypage/(components)/Profile/index.tsx diff --git a/src/components/Profile/Box/ContentBox/ContentBox.styled.tsx b/src/app/mypage/(components)/ProfileStateChange/ContentBox/ContentBox.styled.tsx similarity index 100% rename from src/components/Profile/Box/ContentBox/ContentBox.styled.tsx rename to src/app/mypage/(components)/ProfileStateChange/ContentBox/ContentBox.styled.tsx diff --git a/src/components/Profile/Box/ContentBox/ContentBox.tsx b/src/app/mypage/(components)/ProfileStateChange/ContentBox/ContentBox.tsx similarity index 100% rename from src/components/Profile/Box/ContentBox/ContentBox.tsx rename to src/app/mypage/(components)/ProfileStateChange/ContentBox/ContentBox.tsx diff --git a/src/components/Profile/Box/ContentBox/index.tsx b/src/app/mypage/(components)/ProfileStateChange/ContentBox/index.tsx similarity index 100% rename from src/components/Profile/Box/ContentBox/index.tsx rename to src/app/mypage/(components)/ProfileStateChange/ContentBox/index.tsx diff --git a/src/components/Profile/ProfileStateChange/CustomerCenter.styled.ts b/src/app/mypage/(components)/ProfileStateChange/CustomerCenter.styled.ts similarity index 100% rename from src/components/Profile/ProfileStateChange/CustomerCenter.styled.ts rename to src/app/mypage/(components)/ProfileStateChange/CustomerCenter.styled.ts diff --git a/src/components/Profile/ProfileStateChange/CustomerCenter.tsx b/src/app/mypage/(components)/ProfileStateChange/CustomerCenter.tsx similarity index 94% rename from src/components/Profile/ProfileStateChange/CustomerCenter.tsx rename to src/app/mypage/(components)/ProfileStateChange/CustomerCenter.tsx index b7b3f225..e9a23dd5 100644 --- a/src/components/Profile/ProfileStateChange/CustomerCenter.tsx +++ b/src/app/mypage/(components)/ProfileStateChange/CustomerCenter.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react'; -import TitleComponent from '../Box/TitleBox/TitleBox'; -import ContentComponent from '../Box/ContentBox/ContentBox'; +import TitleComponent from './TitleBox'; +import ContentComponent from './ContentBox/ContentBox'; import { CustomerCenterBox } from './CustomerCenter.styled'; import useAuth from '@/hooks/useAuth'; import axios from 'axios'; diff --git a/src/components/Profile/Box/TitleBox/TitleBox.styled.ts b/src/app/mypage/(components)/ProfileStateChange/TitleBox/TitleBox.styled.ts similarity index 100% rename from src/components/Profile/Box/TitleBox/TitleBox.styled.ts rename to src/app/mypage/(components)/ProfileStateChange/TitleBox/TitleBox.styled.ts diff --git a/src/components/Profile/Box/TitleBox/TitleBox.tsx b/src/app/mypage/(components)/ProfileStateChange/TitleBox/TitleBox.tsx similarity index 100% rename from src/components/Profile/Box/TitleBox/TitleBox.tsx rename to src/app/mypage/(components)/ProfileStateChange/TitleBox/TitleBox.tsx diff --git a/src/components/Profile/Box/TitleBox/index.tsx b/src/app/mypage/(components)/ProfileStateChange/TitleBox/index.tsx similarity index 100% rename from src/components/Profile/Box/TitleBox/index.tsx rename to src/app/mypage/(components)/ProfileStateChange/TitleBox/index.tsx diff --git a/src/components/Profile/ProfileStateChange/index.tsx b/src/app/mypage/(components)/ProfileStateChange/index.tsx similarity index 100% rename from src/components/Profile/ProfileStateChange/index.tsx rename to src/app/mypage/(components)/ProfileStateChange/index.tsx diff --git a/src/components/Box/SalaryBox/SalaryBox.styled.ts b/src/app/mypage/(components)/SalaryBox/SalaryBox.styled.ts similarity index 100% rename from src/components/Box/SalaryBox/SalaryBox.styled.ts rename to src/app/mypage/(components)/SalaryBox/SalaryBox.styled.ts diff --git a/src/components/Box/SalaryBox/SalaryBox.tsx b/src/app/mypage/(components)/SalaryBox/SalaryBox.tsx similarity index 97% rename from src/components/Box/SalaryBox/SalaryBox.tsx rename to src/app/mypage/(components)/SalaryBox/SalaryBox.tsx index d4044f55..06001676 100644 --- a/src/components/Box/SalaryBox/SalaryBox.tsx +++ b/src/app/mypage/(components)/SalaryBox/SalaryBox.tsx @@ -8,7 +8,7 @@ import { TooltipBox, } from './SalaryBox.styled'; import Image from 'next/image'; -import tooltip from '../../../../public/tooltip.png'; +import tooltip from '../../../../../public/tooltip.png'; import { useState } from 'react'; function SalaryBox(props: SalaryBoxProps) { diff --git a/src/components/Box/SalaryBox/index.tsx b/src/app/mypage/(components)/SalaryBox/index.tsx similarity index 100% rename from src/components/Box/SalaryBox/index.tsx rename to src/app/mypage/(components)/SalaryBox/index.tsx diff --git a/src/components/Button/AccountShowBtn/index.tsx b/src/app/mypage/(components)/salaryProfile/index.tsx similarity index 100% rename from src/components/Button/AccountShowBtn/index.tsx rename to src/app/mypage/(components)/salaryProfile/index.tsx diff --git a/src/components/Profile/salaryProfile/salaryProfile.styled.ts b/src/app/mypage/(components)/salaryProfile/salaryProfile.styled.ts similarity index 100% rename from src/components/Profile/salaryProfile/salaryProfile.styled.ts rename to src/app/mypage/(components)/salaryProfile/salaryProfile.styled.ts diff --git a/src/components/Profile/salaryProfile/salaryProfile.tsx b/src/app/mypage/(components)/salaryProfile/salaryProfile.tsx similarity index 100% rename from src/components/Profile/salaryProfile/salaryProfile.tsx rename to src/app/mypage/(components)/salaryProfile/salaryProfile.tsx diff --git a/src/app/mypage/edit/page.tsx b/src/app/mypage/edit/page.tsx index e1698e90..87dbe3fd 100644 --- a/src/app/mypage/edit/page.tsx +++ b/src/app/mypage/edit/page.tsx @@ -1,7 +1,7 @@ 'use client'; import styled from 'styled-components'; -import NicknameForm from '@/components/SingleForm/NicknameForm'; -import PhoneNumForm from '@/components/SingleForm/PhoneNumForm'; +import NicknameForm from '@/components/Form/NicknameForm'; +import PhoneNumForm from '@/components/Form/PhoneNumForm'; import React, { useState, useEffect } from 'react'; import { postUserProfileImage } from '@/api/user/_images/postUserProfileImage'; import { changeUserInfo } from '@/api/user/info/changeUserInfoFetch'; @@ -16,10 +16,10 @@ import { sameUserAtom, } from '@/stores/signup'; import { phoneNum } from '@/stores/signup'; -import Photo from '@/components/Photo'; +import Photo from '@/components/common/Photo'; import useAuth from '@/hooks/useAuth'; import { useRouter } from 'next/navigation'; -import BackHeader from '@/components/Header/BackHeader'; +import BackHeader from '@/components/common/Header/BackHeader'; import { userInfoFetch } from '@/api/user/info/useInfoFetch'; import findExCode from '@/utils/findExCode'; function page() { diff --git a/src/app/mypage/page.tsx b/src/app/mypage/page.tsx index 1cfb1447..046f96ae 100644 --- a/src/app/mypage/page.tsx +++ b/src/app/mypage/page.tsx @@ -1,24 +1,24 @@ 'use client'; -import Profile from '../../components/Profile'; -import ProfileManage from '../../components/Profile/ProfileManage'; -import CustomerCenter from '../../components/Profile/ProfileStateChange/CustomerCenter'; +import Profile from './(components)/Profile'; +import ProfileManage from './(components)/Profile/ProfileManage'; +import CustomerCenter from './(components)/ProfileStateChange/CustomerCenter'; import React, { useEffect, useState } from 'react'; import useAuth from '../../hooks/useAuth'; import { useGetSalaryAmountQuery } from '@/hooks/query/useGetSalaryAmount'; import { useAtom } from 'jotai'; -import NotLmypage from '../../components/NotLogin/NotLmypage/NotLmypage'; +import NotLmypage from './(components)/NotLogin/NotLmypage/NotLmypage'; import useModal from '../../hooks/useModal'; import { useGetMyInfoQuery } from '@/hooks/query/useGetMyInfo'; import { createPortal } from 'react-dom'; import DimmedModal from '../../components/Modal/DimmedModal'; import { userType } from '../../types/user/user'; -import SalaryBox from '../../components/Box/SalaryBox'; +import SalaryBox from './(components)/SalaryBox'; import { mySeniorId } from '../../stores/senior'; -import LogoLayer from '@/components/LogoLayer/LogoLayer'; +import LogoLayer from '@/components/common/LogoLayer/LogoLayer'; import SearchModal from '@/components/Modal/SearchModal'; -import AccountShowBtn from '@/components/Button/AccountShowBtn/AccountShowBtn'; +import AccountShowBtn from '@/components/common/Button/AccountShowBtn/AccountShowBtn'; import MenuBar from '@/components/Bar/MenuBar'; -import Footer from '@/components/Footer'; +import Footer from '@/components/common/Footer'; import { certifiRegAtom, profileRegAtom } from '@/stores/signup'; import useFullModal from '@/hooks/useFullModal'; diff --git a/src/app/mypage/salary/page.tsx b/src/app/mypage/salary/page.tsx index 9cd2e80c..2fcfc186 100644 --- a/src/app/mypage/salary/page.tsx +++ b/src/app/mypage/salary/page.tsx @@ -1,13 +1,13 @@ 'use client'; -import SalaryBox from '@/components/Box/SalaryBox'; +import SalaryBox from '@/app/mypage/(components)/SalaryBox'; import React, { useEffect, useState } from 'react'; import useAuth from '@/hooks/useAuth'; import axios from 'axios'; import styled from 'styled-components'; import { tapType } from '@/types/tap/tap'; import { TAB, STAB_STATE } from '@/constants/tab/ctap'; -import SalaryProfile from '@/components/Profile/salaryProfile/salaryProfile'; -import BackHeader from '@/components/Header/BackHeader'; +import SalaryProfile from '../(components)/salaryProfile/salaryProfile'; +import BackHeader from '@/components/common/Header/BackHeader'; import { useRouter } from 'next/navigation'; function SalaryPage() { diff --git a/src/app/page.tsx b/src/app/page.tsx index 79d9ab0f..ed836773 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,7 +1,7 @@ import { Hydrate, dehydrate } from '@tanstack/react-query'; import { getSeniorList } from '@/api/senior/getSeinorList'; -import { SeniorList } from '@/components/SeniorList'; +import { SeniorList } from '@/components/domain/senior/SeniorList'; import getQueryClient from '@/utils/getQueryClient'; export default async function Home() { diff --git a/src/app/search-results/page.tsx b/src/app/search-results/page.tsx index 179e35c9..de2186f2 100644 --- a/src/app/search-results/page.tsx +++ b/src/app/search-results/page.tsx @@ -3,13 +3,13 @@ import React, { useEffect, useState } from 'react'; import { useSearchParams } from 'next/navigation'; import styled from 'styled-components'; import { useRouter } from 'next/navigation'; -import SeniorProfile from '@/components/SeniorProfile/SeniorProfile'; +import SeniorProfile from '@/components/domain/senior/SeniorProfile/SeniorProfile'; import axios from 'axios'; import Image from 'next/image'; import arrow from '../../../public/arrow.png'; -import SearchDropDown from '@/components/DropDown/SearchDropDown'; +import SearchDropDown from '@/components/common/DropDown/SearchDropDown'; import SearchModal from '@/components/Modal/SearchModal'; -import Spinner from '@/components/Spinner'; +import Spinner from '@/components/common/Spinner'; import { SeniorProfileData } from '@/types/profile/seniorProfile'; function SearchResultPage() { diff --git a/src/app/senior/account/done/page.tsx b/src/app/senior/account/done/page.tsx index 709ea011..2c4cae8c 100644 --- a/src/app/senior/account/done/page.tsx +++ b/src/app/senior/account/done/page.tsx @@ -4,7 +4,7 @@ import Image from 'next/image'; import { useRouter } from 'next/navigation'; import accept from '../../../../../public/cState.png'; import styled from 'styled-components'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; function page() { const router = useRouter(); diff --git a/src/app/senior/account/page.tsx b/src/app/senior/account/page.tsx index ab75bd46..fbc44c37 100644 --- a/src/app/senior/account/page.tsx +++ b/src/app/senior/account/page.tsx @@ -1,13 +1,13 @@ 'use client'; -import InputForm from '@/components/SingleForm/InputForm/InputForm'; +import InputForm from '@/components/Form/InputForm/InputForm'; import React, { useEffect, useState } from 'react'; import { useRouter } from 'next/navigation'; import styled from 'styled-components'; import useAuth from '@/hooks/useAuth'; import axios from 'axios'; -import SingleValidator from '@/components/Validator/SingleValidator'; -import BackHeader from '@/components/Header/BackHeader'; -import ModalBtn from '@/components/Button/ModalBtn'; +import SingleValidator from '@/components/common/SingleValidator'; +import BackHeader from '@/components/common/Header/BackHeader'; +import ModalBtn from '@/components/common/Button/ModalBtn'; import useModal from '@/hooks/useModal'; import { ModalType } from '@/types/modal/riseUp'; import RiseUpModal from '@/components/Modal/RiseUpModal'; diff --git a/src/app/senior/auth/page.tsx b/src/app/senior/auth/page.tsx index 75c35094..ae56ad1f 100644 --- a/src/app/senior/auth/page.tsx +++ b/src/app/senior/auth/page.tsx @@ -1,7 +1,7 @@ 'use client'; -import BackHeader from '@/components/Header/BackHeader'; -import Photo from '@/components/Photo'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import BackHeader from '@/components/common/Header/BackHeader'; +import Photo from '@/components/common/Photo'; +import SingleValidator from '@/components/common/SingleValidator'; import { useRouter } from 'next/navigation'; import { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/src/app/senior/edit-profile/page.tsx b/src/app/senior/edit-profile/page.tsx index 98f3f2b0..20cd2fdf 100644 --- a/src/app/senior/edit-profile/page.tsx +++ b/src/app/senior/edit-profile/page.tsx @@ -1,13 +1,13 @@ 'use client'; -import ClickedBtn from '@/components/Button/ClickedBtn'; -import ModalBtn from '@/components/Button/ModalBtn'; -import BackHeader from '@/components/Header/BackHeader'; +import ClickedBtn from '@/components/common/Button/ClickedBtn'; +import ModalBtn from '@/components/common/Button/ModalBtn'; +import BackHeader from '@/components/common/Header/BackHeader'; import RiseUpModal from '@/components/Modal/RiseUpModal'; -import ProfileForm from '@/components/SingleForm/ProfileForm'; +import ProfileForm from '@/components/Form/ProfileForm'; import Image from 'next/image'; import WhiteAddBtnIcon from '../../../../public/white-add-btn.svg'; -import { TextFormEl } from '@/components/SingleForm/TextForm/TextForm.styled'; +import { TextFormEl } from '@/components/Form/TextForm/TextForm.styled'; import { PROFILE_PLACEHOLDER, PROFILE_TITLE, diff --git a/src/app/senior/info/[seniorId]/SeniorInfo.tsx b/src/app/senior/info/[seniorId]/SeniorInfo.tsx index 5ae0d181..45f67e67 100644 --- a/src/app/senior/info/[seniorId]/SeniorInfo.tsx +++ b/src/app/senior/info/[seniorId]/SeniorInfo.tsx @@ -1,10 +1,18 @@ 'use client'; import dynamic from 'next/dynamic'; -const IntroCard = dynamic(() => import('@/components/Card/IntroCard')); -const KeywordCard = dynamic(() => import('@/components/Card/KeywordCard')); -const ProfileCard = dynamic(() => import('@/components/Card/ProfileCard')); -const BackHeader = dynamic(() => import('@/components/Header/BackHeader')); +const IntroCard = dynamic( + () => import('@/components/domain/senior/SeniorCard/IntroCard'), +); +const KeywordCard = dynamic( + () => import('@/components/domain/senior/SeniorCard/KeywordCard'), +); +const ProfileCard = dynamic( + () => import('@/components/domain/senior/SeniorCard/ProfileCard'), +); +const BackHeader = dynamic( + () => import('@/components/common/Header/BackHeader'), +); import styled from 'styled-components'; import useAuth from '@/hooks/useAuth'; diff --git a/src/app/senior/mentoring/page.tsx b/src/app/senior/mentoring/page.tsx index 1328bc3a..2c77b128 100644 --- a/src/app/senior/mentoring/page.tsx +++ b/src/app/senior/mentoring/page.tsx @@ -10,7 +10,7 @@ const STabBar = dynamic( import React, { useEffect } from 'react'; import styled from 'styled-components'; import useAuth from '@/hooks/useAuth'; -import LogoLayer from '@/components/LogoLayer/LogoLayer'; +import LogoLayer from '@/components/common/LogoLayer/LogoLayer'; import MenuBar from '@/components/Bar/MenuBar'; import SearchModal from '@/components/Modal/SearchModal'; import { overlay } from 'overlay-kit'; diff --git a/src/app/signout/(components)/signout-finish/index.tsx b/src/app/signout/(components)/signout-finish/index.tsx index 53a13e9f..e2522529 100644 --- a/src/app/signout/(components)/signout-finish/index.tsx +++ b/src/app/signout/(components)/signout-finish/index.tsx @@ -5,7 +5,7 @@ import Image from 'next/image'; import { SignOutInfoContainer } from '@/app/signout/(components)/signout-type-select'; import SignOutImage from '/public/signout.png'; import { useSignOutInfo } from '@/app/signout/signoutContext'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; import { withAuthInstance } from '@/api/api'; import { useRouter } from 'next/navigation'; export function SignOutFinish() { diff --git a/src/app/signout/(components)/signout-info/index.tsx b/src/app/signout/(components)/signout-info/index.tsx index 742908df..171188ae 100644 --- a/src/app/signout/(components)/signout-info/index.tsx +++ b/src/app/signout/(components)/signout-info/index.tsx @@ -1,6 +1,6 @@ import { SignOutInfoContainer } from '@/app/signout/(components)/signout-type-select'; import styled from 'styled-components'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; export function SignOutInfo({ onClick }: { onClick: () => void }) { return ( diff --git a/src/app/signout/(components)/signout-reason/index.tsx b/src/app/signout/(components)/signout-reason/index.tsx index 12e30013..172bcdb4 100644 --- a/src/app/signout/(components)/signout-reason/index.tsx +++ b/src/app/signout/(components)/signout-reason/index.tsx @@ -1,11 +1,11 @@ import { SignOutInfoContainer } from '@/app/signout/(components)/signout-type-select'; import { useSignOutInfo } from '@/app/signout/signoutContext'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; import Image from 'next/image'; import styled from 'styled-components'; import ArrowDownGray from '../../../../../public/arrow-down.png'; -import MatchingForm from '@/components/SingleForm/MatchingForm'; -import TextForm from '@/components/SingleForm/TextForm'; +import MatchingForm from '@/components/Form/MatchingForm'; +import TextForm from '@/components/Form/TextForm'; import { useState } from 'react'; import { diff --git a/src/app/signout/(components)/signout-type-select/index.tsx b/src/app/signout/(components)/signout-type-select/index.tsx index 90c4c3a0..1c573919 100644 --- a/src/app/signout/(components)/signout-type-select/index.tsx +++ b/src/app/signout/(components)/signout-type-select/index.tsx @@ -2,7 +2,7 @@ import Image from 'next/image'; import styled from 'styled-components'; import SignOutJuniorImage from '/public/signout_junior.png'; import SignOutSeniorImage from '/public/signout_senior.png'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; import { useSignOutInfo } from '@/app/signout/signoutContext'; export function SignOutTypeSelect({ onClick }: { onClick: () => void }) { diff --git a/src/app/signup/done/page.tsx b/src/app/signup/done/page.tsx index 84169698..72e21fba 100644 --- a/src/app/signup/done/page.tsx +++ b/src/app/signup/done/page.tsx @@ -1,12 +1,12 @@ 'use client'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; import { prevPathAtom } from '@/stores/signup'; import { useAtomValue } from 'jotai'; import Image from 'next/image'; import party_popper from '../../../../public/party_popper.png'; -import ClickedBtn from '@/components/Button/ClickedBtn'; +import ClickedBtn from '@/components/common/Button/ClickedBtn'; import { useRouter } from 'next/navigation'; -import BackHeader from '@/components/Header/BackHeader'; +import BackHeader from '@/components/common/Header/BackHeader'; import styled from 'styled-components'; import useAuth from '@/hooks/useAuth'; import { useEffect, useState } from 'react'; diff --git a/src/components/ServiceCondition/ServiceCondition.styled.ts b/src/app/signup/select/common-info/(components)/ServiceCondition/ServiceCondition.styled.ts similarity index 100% rename from src/components/ServiceCondition/ServiceCondition.styled.ts rename to src/app/signup/select/common-info/(components)/ServiceCondition/ServiceCondition.styled.ts diff --git a/src/components/ServiceCondition/ServiceCondition.tsx b/src/app/signup/select/common-info/(components)/ServiceCondition/ServiceCondition.tsx similarity index 97% rename from src/components/ServiceCondition/ServiceCondition.tsx rename to src/app/signup/select/common-info/(components)/ServiceCondition/ServiceCondition.tsx index 98dbd55b..d79f2914 100644 --- a/src/components/ServiceCondition/ServiceCondition.tsx +++ b/src/app/signup/select/common-info/(components)/ServiceCondition/ServiceCondition.tsx @@ -1,5 +1,5 @@ 'use client'; -import CheckBox from '../Checkbox/CheckBox'; +import CheckBox from '@/components/common/Checkbox'; import React, { useState, useEffect } from 'react'; import { TermsContainer, diff --git a/src/components/ServiceCondition/index.tsx b/src/app/signup/select/common-info/(components)/ServiceCondition/index.tsx similarity index 100% rename from src/components/ServiceCondition/index.tsx rename to src/app/signup/select/common-info/(components)/ServiceCondition/index.tsx diff --git a/src/app/signup/select/common-info/(constants)/index.ts b/src/app/signup/select/common-info/(constants)/index.ts new file mode 100644 index 00000000..f7d59da8 --- /dev/null +++ b/src/app/signup/select/common-info/(constants)/index.ts @@ -0,0 +1,4 @@ +export const COMMON_INFO_ERROR_MESSAGES = { + SIGN_UP_ERROR: '회원가입을 할 수 없습니다. 잠시 후 다시 시도해주세요', + LOGIN_ERROR: '로그인 정보가 유효하지 않습니다. 다시 로그인해 주세요.', +}; diff --git a/src/app/signup/select/common-info/auth/page.tsx b/src/app/signup/select/common-info/auth/page.tsx index c83beda2..20d1caf4 100644 --- a/src/app/signup/select/common-info/auth/page.tsx +++ b/src/app/signup/select/common-info/auth/page.tsx @@ -1,7 +1,7 @@ 'use client'; -import BackHeader from '@/components/Header/BackHeader'; -import Photo from '@/components/Photo'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import BackHeader from '@/components/common/Header/BackHeader'; +import Photo from '@/components/common/Photo'; +import SingleValidator from '@/components/common/SingleValidator'; import { photoUrlAtom } from '@/stores/senior'; import { useSetAtom } from 'jotai'; import { useRouter } from 'next/navigation'; diff --git a/src/app/signup/select/common-info/matching-info/page.tsx b/src/app/signup/select/common-info/matching-info/page.tsx index 3476b646..df3182cf 100644 --- a/src/app/signup/select/common-info/matching-info/page.tsx +++ b/src/app/signup/select/common-info/matching-info/page.tsx @@ -1,7 +1,7 @@ 'use client'; -import SignUpBtn from '@/components/Button/SignUpBtn'; -import BackHeader from '@/components/Header/BackHeader'; -import MatchingForm from '@/components/SingleForm/MatchingForm'; +import SignUpBtn from '@/components/common/Button/SignUpBtn'; +import BackHeader from '@/components/common/Header/BackHeader'; +import MatchingForm from '@/components/Form/MatchingForm'; import styled from 'styled-components'; import { desiredField, @@ -11,8 +11,8 @@ import { matchingReceiveAtom, } from '@/stores/matching'; import { useAtom, useAtomValue, useSetAtom } from 'jotai'; -import CheckBox from '@/components/Checkbox'; -import NextBtn from '@/components/Button/NextBtn'; +import CheckBox from '@/components/common/Checkbox'; +import NextBtn from '@/components/common/Button/NextBtn'; import { useEffect } from 'react'; import { detectReload, preventClose } from '@/utils/reloadFun'; import { useRouter } from 'next/navigation'; diff --git a/src/app/signup/select/common-info/page.tsx b/src/app/signup/select/common-info/page.tsx index ffe762e7..4edad495 100644 --- a/src/app/signup/select/common-info/page.tsx +++ b/src/app/signup/select/common-info/page.tsx @@ -1,29 +1,42 @@ 'use client'; -import NicknameForm from '@/components/SingleForm/NicknameForm'; -import ServiceCondition from '@/components/ServiceCondition'; -import NextBtn from '@/components/Button/NextBtn'; -import PhoneNumForm from '@/components/SingleForm/PhoneNumForm'; +import NicknameForm from '@/components/Form/NicknameForm'; +import ServiceCondition from './(components)/ServiceCondition'; +import NextBtn from '@/components/common/Button/NextBtn'; +import PhoneNumForm from '@/components/Form/PhoneNumForm'; + +import { COMMON_INFO_ERROR_MESSAGES } from './(constants)'; import { useAtomValue } from 'jotai'; import { changeNickname, notDuplicate, phoneNum, phoneNumValidation, - userTypeAtom, } from '@/stores/signup'; -import BackHeader from '@/components/Header/BackHeader'; +import BackHeader from '@/components/common/Header/BackHeader'; import { essential } from '@/stores/condition'; -import { useEffect } from 'react'; +import { useEffect, useState } from 'react'; import { detectReload, preventClose } from '@/utils/reloadFun'; +import { useSignUpUser } from '@/hooks/mutations/useSignupUser'; +import useAuth from '@/hooks/useAuth'; +import { useRouter } from 'next/navigation'; +import { useToast } from '@/hooks/useToast'; +import { SignUpBtnContainer } from '@/components/common/Button/SignUpBtn/SignUpBtn.styled'; function CommonInfoPage() { - const userType = useAtomValue(userTypeAtom); + const [socialId, setSocialId] = useState(null); + + const router = useRouter(); + const { addToast } = useToast(); + const { setAccessToken, setRefreshToken, setUserType } = useAuth(); + const userNick = useAtomValue(changeNickname); const fullNum = useAtomValue(phoneNum); const service = useAtomValue(essential); const nickAvailable = useAtomValue(notDuplicate); const phoneAvailable = useAtomValue(phoneNumValidation); + const { mutate: signupUser } = useSignUpUser(); + useEffect(() => { detectReload(); @@ -34,6 +47,52 @@ function CommonInfoPage() { }; }, []); + useEffect(() => { + if (typeof window !== 'undefined') { + const socialId = window.localStorage.getItem('socialId'); + const socialIdNum = socialId ? parseInt(socialId) : null; + setSocialId(socialIdNum); + } + }, []); + + const handleSignup = () => { + if (socialId) { + signupUser( + { + socialId, + nickName: userNick, + phoneNumber: fullNum, + marketingReceive: service, + }, + { + onError: () => { + addToast({ + message: COMMON_INFO_ERROR_MESSAGES.SIGN_UP_ERROR, + status: 'error', + }); + }, + onSuccess: (data) => { + setAccessToken({ + token: data.accessToken, + expires: data.accessExpiration, + }); + setRefreshToken({ + token: data.refreshToken, + expires: data.refreshExpiration, + }); + setUserType(data.role); + router.push('/signup/done'); + }, + }, + ); + } else { + addToast({ + message: COMMON_INFO_ERROR_MESSAGES.LOGIN_ERROR, + status: 'error', + }); + } + }; + return (
@@ -44,11 +103,9 @@ function CommonInfoPage() { {userNick && fullNum && service && nickAvailable && phoneAvailable ? ( - + + 가입완료 하기 + ) : ( )} diff --git a/src/app/signup/select/common-info/senior-info/field/page.tsx b/src/app/signup/select/common-info/senior-info/field/page.tsx index fb846d84..6b63a4d7 100644 --- a/src/app/signup/select/common-info/senior-info/field/page.tsx +++ b/src/app/signup/select/common-info/senior-info/field/page.tsx @@ -7,7 +7,7 @@ import { useEffect, useState } from 'react'; import useAuth from '@/hooks/useAuth'; import styled from 'styled-components'; -import BackHeader from '@/components/Header/BackHeader'; +import BackHeader from '@/components/common/Header/BackHeader'; import { FormProvider, useForm } from 'react-hook-form'; import ProgressBar from '@/components/Bar/ProgressBar'; import { detectReload, preventClose } from '@/utils/reloadFun'; diff --git a/src/app/signup/select/common-info/senior-info/lab/page.tsx b/src/app/signup/select/common-info/senior-info/lab/page.tsx index 2163999c..b7d49fd6 100644 --- a/src/app/signup/select/common-info/senior-info/lab/page.tsx +++ b/src/app/signup/select/common-info/senior-info/lab/page.tsx @@ -1,7 +1,7 @@ 'use client'; -import NextBtn from '@/components/Button/NextBtn'; -import TextForm from '@/components/SingleForm/TextForm'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import NextBtn from '@/components/common/Button/NextBtn'; +import TextForm from '@/components/Form/TextForm'; +import SingleValidator from '@/components/common/SingleValidator'; import { sFieldAtom, sKeywordAtom, @@ -14,7 +14,7 @@ import { useAtomValue } from 'jotai'; import { useRouter } from 'next/navigation'; import { useEffect, useState } from 'react'; import styled from 'styled-components'; -import BackHeader from '@/components/Header/BackHeader'; +import BackHeader from '@/components/common/Header/BackHeader'; import ProgressBar from '@/components/Bar/ProgressBar'; import { detectReload, preventClose } from '@/utils/reloadFun'; import { SENIOR_LAB } from '@/constants/signup/senior'; diff --git a/src/app/signup/select/common-info/senior-info/major/page.tsx b/src/app/signup/select/common-info/senior-info/major/page.tsx index 8ea938d0..ceba75b5 100644 --- a/src/app/signup/select/common-info/senior-info/major/page.tsx +++ b/src/app/signup/select/common-info/senior-info/major/page.tsx @@ -1,8 +1,8 @@ 'use client'; -import ModalBtn from '@/components/Button/ModalBtn'; -import NextBtn from '@/components/Button/NextBtn'; +import ModalBtn from '@/components/common/Button/ModalBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; import RiseUpModal from '@/components/Modal/RiseUpModal'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import SingleValidator from '@/components/common/SingleValidator'; import { sMajorAtom, sPostGraduAtom } from '@/stores/senior'; import { useAtomValue } from 'jotai'; import { overlay } from 'overlay-kit'; @@ -10,7 +10,7 @@ import { useRouter } from 'next/navigation'; import { useEffect, useState } from 'react'; import styled from 'styled-components'; -import BackHeader from '@/components/Header/BackHeader'; +import BackHeader from '@/components/common/Header/BackHeader'; import ProgressBar from '@/components/Bar/ProgressBar'; import { detectReload, preventClose } from '@/utils/reloadFun'; import { SENIOR_MAJOR } from '@/constants/signup/senior'; diff --git a/src/app/signup/select/page.tsx b/src/app/signup/select/page.tsx index 2b169349..72f9a82e 100644 --- a/src/app/signup/select/page.tsx +++ b/src/app/signup/select/page.tsx @@ -1,7 +1,7 @@ 'use client'; import { useState, useEffect } from 'react'; -import TypeBtn from '@/components/Button/TypeBtn'; -import BackHeader from '@/components/Header/BackHeader'; +import TypeBtn from '@/components/common/Button/TypeBtn'; +import BackHeader from '@/components/common/Header/BackHeader'; import { useRouter, usePathname } from 'next/navigation'; import styled from 'styled-components'; import junior from '../../../../public/junior.png'; diff --git a/src/components/Bar/ProgressBar/ProgressBar.tsx b/src/components/Bar/ProgressBar/ProgressBar.tsx index 8d39a273..820ff066 100644 --- a/src/components/Bar/ProgressBar/ProgressBar.tsx +++ b/src/components/Bar/ProgressBar/ProgressBar.tsx @@ -10,6 +10,10 @@ function ProgressBar({ }) { useEffect(() => { const activeStepArr = document.getElementsByClassName('stepper-tab'); + + for (let i = 0; i < totalNum; i++) { + activeStepArr[i].classList.remove('active'); + } for (let i = 0; i <= activeNum; i++) { activeStepArr[i].classList.add('active'); } diff --git a/src/components/Bar/TapBar/JuniorTab/JTabBar.styled.ts b/src/components/Bar/TapBar/JuniorTab/JTabBar.styled.ts index d33664cb..ad774905 100644 --- a/src/components/Bar/TapBar/JuniorTab/JTabBar.styled.ts +++ b/src/components/Bar/TapBar/JuniorTab/JTabBar.styled.ts @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import ModalBtn from '@/components/Button/ModalBtn'; +import ModalBtn from '@/components/common/Button/ModalBtn'; interface TapStyleProps { selected: boolean; } diff --git a/src/components/Bar/TapBar/JuniorTab/JTabBar.tsx b/src/components/Bar/TapBar/JuniorTab/JTabBar.tsx index b439cc75..0a2a1ab3 100644 --- a/src/components/Bar/TapBar/JuniorTab/JTabBar.tsx +++ b/src/components/Bar/TapBar/JuniorTab/JTabBar.tsx @@ -14,9 +14,9 @@ import { activeTabAtom } from '@/stores/tap'; import { tapType } from '@/types/tap/tap'; import { TAB } from '@/constants/tab/ctap'; -import MentoringApply from '@/components/Mentoring/MentoringApply/MentoringApply'; -import ModalBtn from '@/components/Button/ModalBtn'; -import useModal from '@/hooks/useModal'; +import MentoringApply from '@/components/domain/mentoring/MentoringApply/MentoringApply'; + +import ModalBtn from '@/components/common/Button/ModalBtn'; import useDimmedModal from '@/hooks/useDimmedModal'; import { ModalMentoringType } from '@/types/modal/mentoringDetail'; @@ -25,8 +25,8 @@ import { useGetMyMentoringActiveTabQuery } from '@/hooks/query/useGetMyMentoring import useFullModal from '@/hooks/useFullModal'; import { JMCancelAtom } from '@/stores/condition'; import { REVIEW_FORM_URL } from '@/constants/form/reviewForm'; -import { StyledSModalBtn } from '@/components/Button/ModalBtn/ModalBtn.styled'; -import MentoringNotYet from '@/components/MentoringNotYet'; +import { StyledSModalBtn } from '@/components/common/Button/ModalBtn/ModalBtn.styled'; +import MentoringNotYet from '@/components/domain/mentoring/MentoringNotYet'; import { useConfirmMyMentoring } from '@/hooks/mutations/useConfirmMyMentoring'; function convertDateType(date: string) { diff --git a/src/components/Bar/TapBar/SeniorTab/STabBar.tsx b/src/components/Bar/TapBar/SeniorTab/STabBar.tsx index c02e5578..f7105b0d 100644 --- a/src/components/Bar/TapBar/SeniorTab/STabBar.tsx +++ b/src/components/Bar/TapBar/SeniorTab/STabBar.tsx @@ -14,11 +14,11 @@ import { tapType } from '@/types/tap/tap'; import { useGetSeniorMentoringActiveTabQuery } from '@/hooks/query/useGetSeniorMentoringActiveTab'; import { TAB, TAB_STATE } from '@/constants/tab/ctap'; -import MentoringApply from '@/components/Mentoring/MentoringApply/MentoringApply'; -import ModalBtn from '@/components/Button/ModalBtn'; +import MentoringApply from '@/components/domain/mentoring/MentoringApply/MentoringApply'; +import ModalBtn from '@/components/common/Button/ModalBtn'; import { ModalMentoringType } from '@/types/modal/mentoringDetail'; -import AccountShowBtn from '@/components/Button/AccountShowBtn/AccountShowBtn'; +import AccountShowBtn from '@/components/common/Button/AccountShowBtn/AccountShowBtn'; import { useRouter } from 'next/navigation'; import useFullModal from '@/hooks/useFullModal'; import { SMCancelAtom } from '@/stores/condition'; diff --git a/src/components/Bar/UnivTapBar/UnivTapBar.styled.ts b/src/components/Bar/UnivTapBar/UnivTapBar.styled.ts index 805bb6e8..220d67c3 100644 --- a/src/components/Bar/UnivTapBar/UnivTapBar.styled.ts +++ b/src/components/Bar/UnivTapBar/UnivTapBar.styled.ts @@ -1,4 +1,4 @@ -import { Dropdown } from '@/components/DropDown/common'; +import { Dropdown } from '@/components/common/DropDown/common'; import styled from 'styled-components'; interface TapStyleProps { diff --git a/src/components/Bar/UnivTapBar/UnivTapBar.tsx b/src/components/Bar/UnivTapBar/UnivTapBar.tsx index 92f3b784..a029ad36 100644 --- a/src/components/Bar/UnivTapBar/UnivTapBar.tsx +++ b/src/components/Bar/UnivTapBar/UnivTapBar.tsx @@ -5,11 +5,11 @@ import { TapStyle, TabBackdrop, TabHeader } from './UnivTapBar.styled'; import { smtapType } from '@/types/tap/tap'; import { suactiveTabAtom, sfactiveTabAtom } from '@/stores/tap'; import { useAtom, useAtomValue, useSetAtom } from 'jotai'; -import { Dropdown } from '@/components/DropDown/common'; +import { Dropdown } from '@/components/common/DropDown/common'; import { SMTAB } from '@/constants/tab/ctap'; import { pageNumAtom } from '@/stores/home'; -import { useDropdownContext } from '@/components/DropDown/common/useDropdown'; -import { DropdownItem } from '@/components/DropDown/common/DropdownItem'; +import { useDropdownContext } from '@/components/common/DropDown/common/useDropdown'; +import { DropdownItem } from '@/components/common/DropDown/common/DropdownItem'; function UnivTapBar() { const factiveTab = useAtomValue(sfactiveTabAtom); diff --git a/src/components/SingleForm/BankForm/BankForm.styled.ts b/src/components/Form/BankForm/BankForm.styled.ts similarity index 100% rename from src/components/SingleForm/BankForm/BankForm.styled.ts rename to src/components/Form/BankForm/BankForm.styled.ts diff --git a/src/components/SingleForm/BankForm/BankForm.tsx b/src/components/Form/BankForm/BankForm.tsx similarity index 100% rename from src/components/SingleForm/BankForm/BankForm.tsx rename to src/components/Form/BankForm/BankForm.tsx diff --git a/src/components/SingleForm/BankForm/index.tsx b/src/components/Form/BankForm/index.tsx similarity index 100% rename from src/components/SingleForm/BankForm/index.tsx rename to src/components/Form/BankForm/index.tsx diff --git a/src/components/SingleForm/HomeSearchForm/HomeSearchForm.styled.ts b/src/components/Form/HomeSearchForm/HomeSearchForm.styled.ts similarity index 100% rename from src/components/SingleForm/HomeSearchForm/HomeSearchForm.styled.ts rename to src/components/Form/HomeSearchForm/HomeSearchForm.styled.ts diff --git a/src/components/SingleForm/HomeSearchForm/HomeSearchForm.tsx b/src/components/Form/HomeSearchForm/HomeSearchForm.tsx similarity index 100% rename from src/components/SingleForm/HomeSearchForm/HomeSearchForm.tsx rename to src/components/Form/HomeSearchForm/HomeSearchForm.tsx diff --git a/src/components/SingleForm/HomeSearchForm/index.tsx b/src/components/Form/HomeSearchForm/index.tsx similarity index 100% rename from src/components/SingleForm/HomeSearchForm/index.tsx rename to src/components/Form/HomeSearchForm/index.tsx diff --git a/src/components/SingleForm/InputForm/InputForm.styled.ts b/src/components/Form/InputForm/InputForm.styled.ts similarity index 100% rename from src/components/SingleForm/InputForm/InputForm.styled.ts rename to src/components/Form/InputForm/InputForm.styled.ts diff --git a/src/components/SingleForm/InputForm/InputForm.tsx b/src/components/Form/InputForm/InputForm.tsx similarity index 100% rename from src/components/SingleForm/InputForm/InputForm.tsx rename to src/components/Form/InputForm/InputForm.tsx diff --git a/src/components/SingleForm/KeywordForm/Keyword.styled.ts b/src/components/Form/KeywordForm/Keyword.styled.ts similarity index 100% rename from src/components/SingleForm/KeywordForm/Keyword.styled.ts rename to src/components/Form/KeywordForm/Keyword.styled.ts diff --git a/src/components/SingleForm/KeywordForm/KeywordForm.tsx b/src/components/Form/KeywordForm/KeywordForm.tsx similarity index 97% rename from src/components/SingleForm/KeywordForm/KeywordForm.tsx rename to src/components/Form/KeywordForm/KeywordForm.tsx index bf5f3beb..9583b872 100644 --- a/src/components/SingleForm/KeywordForm/KeywordForm.tsx +++ b/src/components/Form/KeywordForm/KeywordForm.tsx @@ -12,7 +12,7 @@ import { KeywordInputFormBox, } from './Keyword.styled'; import { SELECT_KEYWORD_TEXT } from '@/constants/keyword/keyword'; -import SelectedBtn from '@/components/Button/SelectedBtn'; +import SelectedBtn from '@/components/common/Button/SelectedBtn'; import { useFormContext } from 'react-hook-form'; function KeywordForm({ clickHandler }: { clickHandler: () => void }) { diff --git a/src/components/Content/LoginRequest/index.tsx b/src/components/Form/KeywordForm/index.tsx similarity index 100% rename from src/components/Content/LoginRequest/index.tsx rename to src/components/Form/KeywordForm/index.tsx diff --git a/src/components/SingleForm/MatchingForm/MatchingForm.styled.ts b/src/components/Form/MatchingForm/MatchingForm.styled.ts similarity index 100% rename from src/components/SingleForm/MatchingForm/MatchingForm.styled.ts rename to src/components/Form/MatchingForm/MatchingForm.styled.ts diff --git a/src/components/SingleForm/MatchingForm/MatchingForm.tsx b/src/components/Form/MatchingForm/MatchingForm.tsx similarity index 100% rename from src/components/SingleForm/MatchingForm/MatchingForm.tsx rename to src/components/Form/MatchingForm/MatchingForm.tsx diff --git a/src/components/SingleForm/MatchingForm/index.tsx b/src/components/Form/MatchingForm/index.tsx similarity index 100% rename from src/components/SingleForm/MatchingForm/index.tsx rename to src/components/Form/MatchingForm/index.tsx diff --git a/src/components/SingleForm/NicknameForm/NicknameForm.styled.ts b/src/components/Form/NicknameForm/NicknameForm.styled.ts similarity index 100% rename from src/components/SingleForm/NicknameForm/NicknameForm.styled.ts rename to src/components/Form/NicknameForm/NicknameForm.styled.ts diff --git a/src/components/SingleForm/NicknameForm/NicknameForm.tsx b/src/components/Form/NicknameForm/NicknameForm.tsx similarity index 98% rename from src/components/SingleForm/NicknameForm/NicknameForm.tsx rename to src/components/Form/NicknameForm/NicknameForm.tsx index 688c986f..0ac7962d 100644 --- a/src/components/SingleForm/NicknameForm/NicknameForm.tsx +++ b/src/components/Form/NicknameForm/NicknameForm.tsx @@ -9,7 +9,7 @@ import { } from '@/stores/signup'; import { useEffect, useState } from 'react'; import axios from 'axios'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import SingleValidator from '@/components/common/SingleValidator'; import { NicknameContainer, NicknameTotalContainer, diff --git a/src/components/SingleForm/NicknameForm/index.tsx b/src/components/Form/NicknameForm/index.tsx similarity index 100% rename from src/components/SingleForm/NicknameForm/index.tsx rename to src/components/Form/NicknameForm/index.tsx diff --git a/src/components/SingleForm/PhoneNumForm/PhoneNumForm.styled.ts b/src/components/Form/PhoneNumForm/PhoneNumForm.styled.ts similarity index 100% rename from src/components/SingleForm/PhoneNumForm/PhoneNumForm.styled.ts rename to src/components/Form/PhoneNumForm/PhoneNumForm.styled.ts diff --git a/src/components/SingleForm/PhoneNumForm/PhoneNumForm.tsx b/src/components/Form/PhoneNumForm/PhoneNumForm.tsx similarity index 97% rename from src/components/SingleForm/PhoneNumForm/PhoneNumForm.tsx rename to src/components/Form/PhoneNumForm/PhoneNumForm.tsx index c94b124b..ace3cd41 100644 --- a/src/components/SingleForm/PhoneNumForm/PhoneNumForm.tsx +++ b/src/components/Form/PhoneNumForm/PhoneNumForm.tsx @@ -1,5 +1,5 @@ 'use client'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import SingleValidator from '@/components/common/SingleValidator'; import { PhoneNumContainer, NumFont } from './PhoneNumForm.styled'; import { useEffect } from 'react'; import { useAtom } from 'jotai'; diff --git a/src/components/SingleForm/PhoneNumForm/index.tsx b/src/components/Form/PhoneNumForm/index.tsx similarity index 100% rename from src/components/SingleForm/PhoneNumForm/index.tsx rename to src/components/Form/PhoneNumForm/index.tsx diff --git a/src/components/SingleForm/PhoneNumForm/phoneNumSchema.ts b/src/components/Form/PhoneNumForm/phoneNumSchema.ts similarity index 100% rename from src/components/SingleForm/PhoneNumForm/phoneNumSchema.ts rename to src/components/Form/PhoneNumForm/phoneNumSchema.ts diff --git a/src/components/SingleForm/ProfileForm/ProfileForm.styled.ts b/src/components/Form/ProfileForm/ProfileForm.styled.ts similarity index 100% rename from src/components/SingleForm/ProfileForm/ProfileForm.styled.ts rename to src/components/Form/ProfileForm/ProfileForm.styled.ts diff --git a/src/components/SingleForm/ProfileForm/ProfileForm.tsx b/src/components/Form/ProfileForm/ProfileForm.tsx similarity index 97% rename from src/components/SingleForm/ProfileForm/ProfileForm.tsx rename to src/components/Form/ProfileForm/ProfileForm.tsx index f4273922..1fc4dd01 100644 --- a/src/components/SingleForm/ProfileForm/ProfileForm.tsx +++ b/src/components/Form/ProfileForm/ProfileForm.tsx @@ -4,7 +4,7 @@ import { ProfileFormContainer, ProfileTitleContainer, } from './ProfileForm.styled'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import SingleValidator from '@/components/common/SingleValidator'; const ProfileForm = forwardRef( (props, _ref) => { diff --git a/src/components/SingleForm/ProfileForm/index.tsx b/src/components/Form/ProfileForm/index.tsx similarity index 100% rename from src/components/SingleForm/ProfileForm/index.tsx rename to src/components/Form/ProfileForm/index.tsx diff --git a/src/components/SingleForm/SearchForm/SearchForm.styled.ts b/src/components/Form/SearchForm/SearchForm.styled.ts similarity index 100% rename from src/components/SingleForm/SearchForm/SearchForm.styled.ts rename to src/components/Form/SearchForm/SearchForm.styled.ts diff --git a/src/components/SingleForm/SearchForm/SearchForm.tsx b/src/components/Form/SearchForm/SearchForm.tsx similarity index 99% rename from src/components/SingleForm/SearchForm/SearchForm.tsx rename to src/components/Form/SearchForm/SearchForm.tsx index baf895d8..12dc9be9 100644 --- a/src/components/SingleForm/SearchForm/SearchForm.tsx +++ b/src/components/Form/SearchForm/SearchForm.tsx @@ -11,7 +11,7 @@ import { useSetAtom } from 'jotai'; import { sMajorAtom, sPostGraduAtom } from '@/stores/senior'; import Image from 'next/image'; import search_color from '../../../../public/search2.png'; -import Spinner from '@/components/Spinner'; +import Spinner from '@/components/common/Spinner'; function SearchForm(props: SearchFormProps) { const kaistStrArr = ['카이스트', 'KAIST']; const [keyword, setKeyword] = useState(''); diff --git a/src/components/SingleForm/SearchForm/index.tsx b/src/components/Form/SearchForm/index.tsx similarity index 100% rename from src/components/SingleForm/SearchForm/index.tsx rename to src/components/Form/SearchForm/index.tsx diff --git a/src/components/SingleForm/SelectForm/SelectForm.styled.ts b/src/components/Form/SelectForm/SelectForm.styled.ts similarity index 100% rename from src/components/SingleForm/SelectForm/SelectForm.styled.ts rename to src/components/Form/SelectForm/SelectForm.styled.ts diff --git a/src/components/SingleForm/SelectForm/SelectForm.tsx b/src/components/Form/SelectForm/SelectForm.tsx similarity index 97% rename from src/components/SingleForm/SelectForm/SelectForm.tsx rename to src/components/Form/SelectForm/SelectForm.tsx index ab5bafcb..71c10f91 100644 --- a/src/components/SingleForm/SelectForm/SelectForm.tsx +++ b/src/components/Form/SelectForm/SelectForm.tsx @@ -1,4 +1,4 @@ -import SelectedBtn from '@/components/Button/SelectedBtn'; +import SelectedBtn from '@/components/common/Button/SelectedBtn'; import { useState } from 'react'; import { FieldInputFormBox, diff --git a/src/components/SingleForm/SelectForm/index.tsx b/src/components/Form/SelectForm/index.tsx similarity index 100% rename from src/components/SingleForm/SelectForm/index.tsx rename to src/components/Form/SelectForm/index.tsx diff --git a/src/components/SingleForm/TextForm/TextForm.styled.ts b/src/components/Form/TextForm/TextForm.styled.ts similarity index 100% rename from src/components/SingleForm/TextForm/TextForm.styled.ts rename to src/components/Form/TextForm/TextForm.styled.ts diff --git a/src/components/SingleForm/TextForm/TextForm.tsx b/src/components/Form/TextForm/TextForm.tsx similarity index 100% rename from src/components/SingleForm/TextForm/TextForm.tsx rename to src/components/Form/TextForm/TextForm.tsx diff --git a/src/components/SingleForm/TextForm/index.tsx b/src/components/Form/TextForm/index.tsx similarity index 100% rename from src/components/SingleForm/TextForm/index.tsx rename to src/components/Form/TextForm/index.tsx diff --git a/src/components/SingleForm/TextareaForm/TextareaForm.styled.ts b/src/components/Form/TextareaForm/TextareaForm.styled.ts similarity index 100% rename from src/components/SingleForm/TextareaForm/TextareaForm.styled.ts rename to src/components/Form/TextareaForm/TextareaForm.styled.ts diff --git a/src/components/SingleForm/TextareaForm/TextareaForm.tsx b/src/components/Form/TextareaForm/TextareaForm.tsx similarity index 95% rename from src/components/SingleForm/TextareaForm/TextareaForm.tsx rename to src/components/Form/TextareaForm/TextareaForm.tsx index 3c199eb7..729916e3 100644 --- a/src/components/SingleForm/TextareaForm/TextareaForm.tsx +++ b/src/components/Form/TextareaForm/TextareaForm.tsx @@ -2,7 +2,7 @@ import { TextareaFormProps } from '@/types/form/textareaForm'; import { TextareaFormContainer, TextareaFormTop } from './TextareaForm.styled'; import { useEffect, useState } from 'react'; import { useAtom } from 'jotai'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import SingleValidator from '@/components/common/SingleValidator'; function TextareaForm(props: TextareaFormProps) { const [charCnt, setCharCnt] = useState(0); diff --git a/src/components/SingleForm/TextareaForm/index.tsx b/src/components/Form/TextareaForm/index.tsx similarity index 100% rename from src/components/SingleForm/TextareaForm/index.tsx rename to src/components/Form/TextareaForm/index.tsx diff --git a/src/components/Modal/DimmedModal/DimmedModal.tsx b/src/components/Modal/DimmedModal/DimmedModal.tsx index d044e1bd..ee2511d3 100644 --- a/src/components/Modal/DimmedModal/DimmedModal.tsx +++ b/src/components/Modal/DimmedModal/DimmedModal.tsx @@ -1,18 +1,17 @@ import { DimmedModalProps } from '@/types/modal/dimmed'; import { DimmedBgContainer, DimmedMdContainer } from './DimmedModal.styled'; -import MProfileContent from '@/components/Content/MProfileContent'; -import LoginRequest from '@/components/Content/LoginRequest/LoginRequest'; +import MProfileContent from '@/components/Modal/ModalContent/MProfileContent'; +import LoginRequest from '@/components/Modal/ModalContent/LoginRequest/LoginRequest'; import NotSenior from '../NotSenior/NotSenior'; -import { userType } from '@/types/user/user'; -import SmentoringCancel from '@/components/Mentoring/SmentoringCancel/SmentoringCancel'; -import MentoringCancel from '@/components/Mentoring/MentoringCancel/MentoringCancel'; -import SNotRegistered from '@/components/Content/SNotRegistered'; -import SuggestModal from '@/components/SuggestModal/SuggestModal'; +import SmentoringCancel from '@/components/domain/mentoring/SmentoringCancel/SmentoringCancel'; +import MentoringCancel from '@/components/domain/mentoring/MentoringCancel/MentoringCancel'; +import SNotRegistered from '@/components/Modal/ModalContent/SNotRegistered'; +import SuggestModal from '@/components/Modal/SuggestModal/SuggestModal'; import AproveModal from '../AproveModal/AproveModal'; -import NotJunior from '@/components/NotJunior/NotJunior'; -import MentoringLogin from '@/components/Content/MentoringLogin'; -import ChangeJunior from '@/components/Content/ChangeJunior'; -import SuccessFail from '@/components/Content/SuccessFail/SuccessFail'; +import NotJunior from './NotJunior/NotJunior'; +import MentoringLogin from '@/components/Modal/ModalContent/MentoringLogin'; +import ChangeJunior from '@/components/Modal/ModalContent/ChangeJunior'; +import SuccessFail from '@/components/Modal/ModalContent/SuccessFail/SuccessFail'; function DimmedModal(props: DimmedModalProps) { return ( diff --git a/src/components/NotJunior/NotJunior.styled.ts b/src/components/Modal/DimmedModal/NotJunior/NotJunior.styled.ts similarity index 100% rename from src/components/NotJunior/NotJunior.styled.ts rename to src/components/Modal/DimmedModal/NotJunior/NotJunior.styled.ts diff --git a/src/components/NotJunior/NotJunior.tsx b/src/components/Modal/DimmedModal/NotJunior/NotJunior.tsx similarity index 97% rename from src/components/NotJunior/NotJunior.tsx rename to src/components/Modal/DimmedModal/NotJunior/NotJunior.tsx index 7a73af5b..be5a9e44 100644 --- a/src/components/NotJunior/NotJunior.tsx +++ b/src/components/Modal/DimmedModal/NotJunior/NotJunior.tsx @@ -1,7 +1,7 @@ 'use client'; import { NotJuniorProps } from '@/types/modal/mypage'; import React, { useState } from 'react'; -import x_icon from '../../../public/x_gray.png'; +import x_icon from '../../../../../public/x_gray.png'; import Image from 'next/image'; import Router, { useRouter } from 'next/navigation'; import { JUNIOR_MODAL } from '@/constants/form/notSeniorForm'; diff --git a/src/components/Modal/FullModal/FullModal.tsx b/src/components/Modal/FullModal/FullModal.tsx index 80363297..eedefb54 100644 --- a/src/components/Modal/FullModal/FullModal.tsx +++ b/src/components/Modal/FullModal/FullModal.tsx @@ -1,17 +1,20 @@ import { FullModalProps } from '@/types/modal/full'; import { FullModalContainer } from './FullModal.styled'; -import MBestCaseContent from '@/components/Content/MBestCaseContent'; -import LoginRequest from '@/components/Content/LoginRequest/LoginRequest'; -import SeniorMyProfile from '@/components/Content/SeniorMyProfile'; -import ProfileModify from '@/components/Content/ProfileModify'; -import SmentoringAccept from '@/components/Mentoring/SmentoringAccept/SmentoringAccept'; -import SInfoModify from '@/components/Content/SInfoModify'; -import AddTime from '@/components/Content/AddTime'; -import SmentoringSpec from '@/components/Mentoring/MentoringSpec/SmentoringSpec/SmentoringSpec'; -import SelectCalendar from '@/components/Content/SelectCalendar'; +import MBestCaseContent from '@/components/Modal/ModalContent/MBestCaseContent'; +import LoginRequest from '@/components/Modal/ModalContent/LoginRequest/LoginRequest'; +import SeniorMyProfile from '@/components/Modal/ModalContent/SeniorMyProfile'; +import ProfileModify from '@/components/Modal/ModalContent/ProfileModify'; +import SmentoringAccept from '@/components/domain/mentoring/SmentoringAccept/SmentoringAccept'; + +import SInfoModify from '@/components/Modal/ModalContent/SInfoModify'; +import AddTime from '@/components/Modal/ModalContent/AddTime'; +import SmentoringSpec from '@/components/domain/mentoring/MentoringSpec/SmentoringSpec/SmentoringSpec'; + +import SelectCalendar from '@/components/Modal/ModalContent/SelectCalendar'; import { firAbleTimeAtom } from '@/stores/mentoring'; -import MentoringSpec from '@/components/Mentoring/MentoringSpec/JmentoringSpec'; -import AccountReactivation from '@/components/Content/AccountReactivation'; +import MentoringSpec from '@/components/domain/mentoring/MentoringSpec/JmentoringSpec'; + +import AccountReactivation from '@/components/Modal/ModalContent/AccountReactivation'; function FullModal(props: FullModalProps) { return ( diff --git a/src/components/Content/AccountReactivation/AccountReactivation.tsx b/src/components/Modal/ModalContent/AccountReactivation/AccountReactivation.tsx similarity index 89% rename from src/components/Content/AccountReactivation/AccountReactivation.tsx rename to src/components/Modal/ModalContent/AccountReactivation/AccountReactivation.tsx index 37a520b2..dff91e19 100644 --- a/src/components/Content/AccountReactivation/AccountReactivation.tsx +++ b/src/components/Modal/ModalContent/AccountReactivation/AccountReactivation.tsx @@ -1,7 +1,7 @@ import styled from 'styled-components'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; -import { BtnStyleNon } from '@/components/Button/NextBtn/NextBtn.styled'; +import { BtnStyleNon } from '@/components/common/Button/NextBtn/NextBtn.styled'; interface AccountReactivationProps { onActive?: () => void; onNonActive?: () => void; diff --git a/src/components/Content/AccountReactivation/index.tsx b/src/components/Modal/ModalContent/AccountReactivation/index.tsx similarity index 100% rename from src/components/Content/AccountReactivation/index.tsx rename to src/components/Modal/ModalContent/AccountReactivation/index.tsx diff --git a/src/components/Content/AddTime/AddTime.styled.ts b/src/components/Modal/ModalContent/AddTime/AddTime.styled.ts similarity index 100% rename from src/components/Content/AddTime/AddTime.styled.ts rename to src/components/Modal/ModalContent/AddTime/AddTime.styled.ts diff --git a/src/components/Content/AddTime/AddTime.tsx b/src/components/Modal/ModalContent/AddTime/AddTime.tsx similarity index 97% rename from src/components/Content/AddTime/AddTime.tsx rename to src/components/Modal/ModalContent/AddTime/AddTime.tsx index 65c92268..d5e2447a 100644 --- a/src/components/Content/AddTime/AddTime.tsx +++ b/src/components/Modal/ModalContent/AddTime/AddTime.tsx @@ -9,14 +9,14 @@ import { ValidatorBox, } from './AddTime.styled'; import Image from 'next/image'; -import x_icon from '../../../../public/x.png'; +import x_icon from '../../../../../public/x.png'; import { WEEK_ARRAY } from '@/constants/form/cProfileForm'; import React, { useEffect, useState } from 'react'; -import SingleValidator from '@/components/Validator/SingleValidator'; +import SingleValidator from '@/components/common/SingleValidator'; import { useAtom } from 'jotai'; import { sAbleTime } from '@/stores/senior'; import { TimeObj } from '@/types/scheduler/scheduler'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; function AddTime({ modalHandler }: { modalHandler: () => void }) { const hourOptions = Array.from({ length: 16 }, (_, index) => index + 9); diff --git a/src/components/Content/AddTime/index.tsx b/src/components/Modal/ModalContent/AddTime/index.tsx similarity index 100% rename from src/components/Content/AddTime/index.tsx rename to src/components/Modal/ModalContent/AddTime/index.tsx diff --git a/src/components/Content/ChangeJunior/ChangeJunior.styled.ts b/src/components/Modal/ModalContent/ChangeJunior/ChangeJunior.styled.ts similarity index 100% rename from src/components/Content/ChangeJunior/ChangeJunior.styled.ts rename to src/components/Modal/ModalContent/ChangeJunior/ChangeJunior.styled.ts diff --git a/src/components/Content/ChangeJunior/ChangeJunior.tsx b/src/components/Modal/ModalContent/ChangeJunior/ChangeJunior.tsx similarity index 93% rename from src/components/Content/ChangeJunior/ChangeJunior.tsx rename to src/components/Modal/ModalContent/ChangeJunior/ChangeJunior.tsx index 8beccc63..4ddb8e2a 100644 --- a/src/components/Content/ChangeJunior/ChangeJunior.tsx +++ b/src/components/Modal/ModalContent/ChangeJunior/ChangeJunior.tsx @@ -1,6 +1,6 @@ import { CJBtn, CJContainer, CJDesc, CJTitle } from './ChangeJunior.styled'; import Image from 'next/image'; -import x_img from '../../../../public/x_gray.png'; +import x_img from '../../../../../public/x_gray.png'; import { MENTORING_APPLY_USER_TYPE } from '@/constants/modal/dimmedModal'; import { useRouter } from 'next/navigation'; diff --git a/src/components/Content/ChangeJunior/index.tsx b/src/components/Modal/ModalContent/ChangeJunior/index.tsx similarity index 100% rename from src/components/Content/ChangeJunior/index.tsx rename to src/components/Modal/ModalContent/ChangeJunior/index.tsx diff --git a/src/components/Content/LoginRequest/LoginRequest.styled.ts b/src/components/Modal/ModalContent/LoginRequest/LoginRequest.styled.ts similarity index 100% rename from src/components/Content/LoginRequest/LoginRequest.styled.ts rename to src/components/Modal/ModalContent/LoginRequest/LoginRequest.styled.ts diff --git a/src/components/Content/LoginRequest/LoginRequest.tsx b/src/components/Modal/ModalContent/LoginRequest/LoginRequest.tsx similarity index 96% rename from src/components/Content/LoginRequest/LoginRequest.tsx rename to src/components/Modal/ModalContent/LoginRequest/LoginRequest.tsx index 8aea21f7..88bcf3d6 100644 --- a/src/components/Content/LoginRequest/LoginRequest.tsx +++ b/src/components/Modal/ModalContent/LoginRequest/LoginRequest.tsx @@ -7,7 +7,7 @@ import { LoginRequestBtn, } from './LoginRequest.styled'; import Image from 'next/image'; -import x_icon from '../../../../public/x_gray.png'; +import x_icon from '../../../../../public/x_gray.png'; const REST_API_KEY = process.env.NEXT_PUBLIC_REST_API_KEY; function LoginRequest(props: loginRequestProps) { diff --git a/src/components/Content/SuccessFail/index.tsx b/src/components/Modal/ModalContent/LoginRequest/index.tsx similarity index 100% rename from src/components/Content/SuccessFail/index.tsx rename to src/components/Modal/ModalContent/LoginRequest/index.tsx diff --git a/src/components/Content/MBestCaseContent/MBestCaseContent.styled.ts b/src/components/Modal/ModalContent/MBestCaseContent/MBestCaseContent.styled.ts similarity index 100% rename from src/components/Content/MBestCaseContent/MBestCaseContent.styled.ts rename to src/components/Modal/ModalContent/MBestCaseContent/MBestCaseContent.styled.ts diff --git a/src/components/Content/MBestCaseContent/MBestCaseContent.tsx b/src/components/Modal/ModalContent/MBestCaseContent/MBestCaseContent.tsx similarity index 89% rename from src/components/Content/MBestCaseContent/MBestCaseContent.tsx rename to src/components/Modal/ModalContent/MBestCaseContent/MBestCaseContent.tsx index b4c9360b..7206f513 100644 --- a/src/components/Content/MBestCaseContent/MBestCaseContent.tsx +++ b/src/components/Modal/ModalContent/MBestCaseContent/MBestCaseContent.tsx @@ -1,7 +1,7 @@ import { MBestCaseContainer } from './MBestCaseContent.styled'; import Image from 'next/image'; import bestCase from '@/../../public/best_sample.png'; -import BackHeader from '@/components/Header/BackHeader'; +import BackHeader from '@/components/common/Header/BackHeader'; function MBestCaseContent({ modalHandler }: { modalHandler: () => void }) { return ( diff --git a/src/components/Content/MBestCaseContent/index.tsx b/src/components/Modal/ModalContent/MBestCaseContent/index.tsx similarity index 100% rename from src/components/Content/MBestCaseContent/index.tsx rename to src/components/Modal/ModalContent/MBestCaseContent/index.tsx diff --git a/src/components/Content/MProfileContent/MProfileContent.styled.ts b/src/components/Modal/ModalContent/MProfileContent/MProfileContent.styled.ts similarity index 100% rename from src/components/Content/MProfileContent/MProfileContent.styled.ts rename to src/components/Modal/ModalContent/MProfileContent/MProfileContent.styled.ts diff --git a/src/components/Content/MProfileContent/MProfileContent.tsx b/src/components/Modal/ModalContent/MProfileContent/MProfileContent.tsx similarity index 95% rename from src/components/Content/MProfileContent/MProfileContent.tsx rename to src/components/Modal/ModalContent/MProfileContent/MProfileContent.tsx index 893036ce..a0e2c512 100644 --- a/src/components/Content/MProfileContent/MProfileContent.tsx +++ b/src/components/Modal/ModalContent/MProfileContent/MProfileContent.tsx @@ -1,4 +1,4 @@ -import x_icon from '../../../../public/x_gray.png'; +import x_icon from '../../../../../public/x_gray.png'; import Image from 'next/image'; import { MProfileBtn, MProfileContainer } from './MProfileContent.styled'; import { MProfileContentProps } from '@/types/content/mProfileContent'; diff --git a/src/components/Content/MProfileContent/index.tsx b/src/components/Modal/ModalContent/MProfileContent/index.tsx similarity index 100% rename from src/components/Content/MProfileContent/index.tsx rename to src/components/Modal/ModalContent/MProfileContent/index.tsx diff --git a/src/components/Content/MentoringLogin/MentoringLogin.styled.ts b/src/components/Modal/ModalContent/MentoringLogin/MentoringLogin.styled.ts similarity index 100% rename from src/components/Content/MentoringLogin/MentoringLogin.styled.ts rename to src/components/Modal/ModalContent/MentoringLogin/MentoringLogin.styled.ts diff --git a/src/components/Content/MentoringLogin/MentoringLogin.tsx b/src/components/Modal/ModalContent/MentoringLogin/MentoringLogin.tsx similarity index 94% rename from src/components/Content/MentoringLogin/MentoringLogin.tsx rename to src/components/Modal/ModalContent/MentoringLogin/MentoringLogin.tsx index 76937363..eccfbd7f 100644 --- a/src/components/Content/MentoringLogin/MentoringLogin.tsx +++ b/src/components/Modal/ModalContent/MentoringLogin/MentoringLogin.tsx @@ -1,7 +1,7 @@ import { MENTORING_APPLY_LOGIN } from '@/constants/modal/dimmedModal'; import { MLBtn, MLContainer, MLDesc, MLTitle } from './MentoringLogin.styled'; import Image from 'next/image'; -import x_img from '../../../../public/x_gray.png'; +import x_img from '../../../../../public/x_gray.png'; const REST_API_KEY = process.env.NEXT_PUBLIC_REST_API_KEY; function MentoringLogin({ modalHandler }: { modalHandler: () => void }) { diff --git a/src/components/Content/MentoringLogin/index.tsx b/src/components/Modal/ModalContent/MentoringLogin/index.tsx similarity index 100% rename from src/components/Content/MentoringLogin/index.tsx rename to src/components/Modal/ModalContent/MentoringLogin/index.tsx diff --git a/src/components/Content/MyLoginRequest/MyLoginRequest.styled.ts b/src/components/Modal/ModalContent/MyLoginRequest/MyLoginRequest.styled.ts similarity index 100% rename from src/components/Content/MyLoginRequest/MyLoginRequest.styled.ts rename to src/components/Modal/ModalContent/MyLoginRequest/MyLoginRequest.styled.ts diff --git a/src/components/Content/MyLoginRequest/MyLoginRequest.tsx b/src/components/Modal/ModalContent/MyLoginRequest/MyLoginRequest.tsx similarity index 91% rename from src/components/Content/MyLoginRequest/MyLoginRequest.tsx rename to src/components/Modal/ModalContent/MyLoginRequest/MyLoginRequest.tsx index 2a42fd28..e7ead89c 100644 --- a/src/components/Content/MyLoginRequest/MyLoginRequest.tsx +++ b/src/components/Modal/ModalContent/MyLoginRequest/MyLoginRequest.tsx @@ -1,10 +1,10 @@ import React from 'react'; import Image from 'next/image'; -import x_icon from '../../../../public/x.png'; -import LoginReq from '../../../../public/LoginReq.png'; -import loginBg from '../../../../public/login-background.png'; -import kakao from '../../../../public/kakao.png'; -import logo from '../../../../public/logo.png'; +import x_icon from '../../../../../public/x.png'; + +import loginBg from '../../../../../public/login-background.png'; +import kakao from '../../../../../public/kakao.png'; +import logo from '../../../../../public/logo.png'; import { useSetAtom } from 'jotai'; import { usePathname } from 'next/navigation'; import { diff --git a/src/components/Content/MyLoginRequest/index.tsx b/src/components/Modal/ModalContent/MyLoginRequest/index.tsx similarity index 100% rename from src/components/Content/MyLoginRequest/index.tsx rename to src/components/Modal/ModalContent/MyLoginRequest/index.tsx diff --git a/src/components/Content/PayAmount/PayAmount.styled.ts b/src/components/Modal/ModalContent/PayAmount/PayAmount.styled.ts similarity index 100% rename from src/components/Content/PayAmount/PayAmount.styled.ts rename to src/components/Modal/ModalContent/PayAmount/PayAmount.styled.ts diff --git a/src/components/Content/PayAmount/PayAmount.tsx b/src/components/Modal/ModalContent/PayAmount/PayAmount.tsx similarity index 96% rename from src/components/Content/PayAmount/PayAmount.tsx rename to src/components/Modal/ModalContent/PayAmount/PayAmount.tsx index 449eeab6..b19d383e 100644 --- a/src/components/Content/PayAmount/PayAmount.tsx +++ b/src/components/Modal/ModalContent/PayAmount/PayAmount.tsx @@ -5,7 +5,7 @@ import { PayAmountDescBox, } from './PayAmount.styled'; import Image from 'next/image'; -import pay_amount from '../../../../public/pay_amount.png'; +import pay_amount from '../../../../../public/pay_amount.png'; import { usePathname, useRouter } from 'next/navigation'; function PayAmount({ modalHandler }: { modalHandler: () => void }) { diff --git a/src/components/Content/PayAmount/index.tsx b/src/components/Modal/ModalContent/PayAmount/index.tsx similarity index 100% rename from src/components/Content/PayAmount/index.tsx rename to src/components/Modal/ModalContent/PayAmount/index.tsx diff --git a/src/components/Content/ProfileModify/ProfileModify.styled.ts b/src/components/Modal/ModalContent/ProfileModify/ProfileModify.styled.ts similarity index 100% rename from src/components/Content/ProfileModify/ProfileModify.styled.ts rename to src/components/Modal/ModalContent/ProfileModify/ProfileModify.styled.ts diff --git a/src/components/Content/ProfileModify/ProfileModify.tsx b/src/components/Modal/ModalContent/ProfileModify/ProfileModify.tsx similarity index 96% rename from src/components/Content/ProfileModify/ProfileModify.tsx rename to src/components/Modal/ModalContent/ProfileModify/ProfileModify.tsx index d971beaf..76d0bd09 100644 --- a/src/components/Content/ProfileModify/ProfileModify.tsx +++ b/src/components/Modal/ModalContent/ProfileModify/ProfileModify.tsx @@ -8,11 +8,11 @@ import { ValidatorBox, SaveBtnBox, } from './ProfileModify.styled'; -import x_icon from '../../../../public/x.png'; +import x_icon from '../../../../../public/x.png'; import { MODIFY_DIRECTION } from '@/constants/form/cProfileModifyForm'; import { useEffect, useState } from 'react'; -import SingleValidator from '@/components/Validator/SingleValidator'; -import ClickedBtn from '@/components/Button/ClickedBtn'; +import SingleValidator from '@/components/common/SingleValidator'; +import ClickedBtn from '@/components/common/Button/ClickedBtn'; import useAuth from '@/hooks/useAuth'; import axios from 'axios'; import RiseUpModal from '@/components/Modal/RiseUpModal'; @@ -24,7 +24,7 @@ import { selectedFieldAtom, totalFieldAtom, } from '@/stores/senior'; -import Scheduler from '@/components/Scheduler'; +import Scheduler from '@/components/domain/mentoring/Scheduler'; import { useRouter } from 'next/navigation'; import findExCode from '@/utils/findExCode'; import { overlay } from 'overlay-kit'; diff --git a/src/components/Content/ProfileModify/index.tsx b/src/components/Modal/ModalContent/ProfileModify/index.tsx similarity index 100% rename from src/components/Content/ProfileModify/index.tsx rename to src/components/Modal/ModalContent/ProfileModify/index.tsx diff --git a/src/components/Content/SInfoModify/SInfoModify.styled.ts b/src/components/Modal/ModalContent/SInfoModify/SInfoModify.styled.ts similarity index 100% rename from src/components/Content/SInfoModify/SInfoModify.styled.ts rename to src/components/Modal/ModalContent/SInfoModify/SInfoModify.styled.ts diff --git a/src/components/Content/SInfoModify/SInfoModify.tsx b/src/components/Modal/ModalContent/SInfoModify/SInfoModify.tsx similarity index 94% rename from src/components/Content/SInfoModify/SInfoModify.tsx rename to src/components/Modal/ModalContent/SInfoModify/SInfoModify.tsx index 3278b570..376f96b0 100644 --- a/src/components/Content/SInfoModify/SInfoModify.tsx +++ b/src/components/Modal/ModalContent/SInfoModify/SInfoModify.tsx @@ -5,14 +5,14 @@ import { SInfoImgBox, SInfoImgInputBox, } from './SInfoModify.styled'; -import x_icon from '../../../../public/x.png'; -import camera_icon from '../../../../public/camera.png'; +import x_icon from '../../../../../public/x.png'; +import camera_icon from '../../../../../public/camera.png'; import { useGetSeniorMyAccountQuery } from '@/hooks/query/useGetSeniorMyAccount'; import Image from 'next/image'; -import RoundedImage from '@/components/Image/RoundedImage'; +import RoundedImage from '@/components/common/RoundedImage'; import { useRouter } from 'next/navigation'; -import NicknameForm from '@/components/SingleForm/NicknameForm'; -import PhoneNumForm from '@/components/SingleForm/PhoneNumForm'; +import NicknameForm from '@/components/Form/NicknameForm'; +import PhoneNumForm from '@/components/Form/PhoneNumForm'; import { useEffect, useState } from 'react'; import { useChangeSeniorAccount } from '@/hooks/mutations/useChangeSeniorAccount'; import { usePostProfileImage } from '@/hooks/mutations/usePostProfileImage'; @@ -24,8 +24,8 @@ import { phoneNum, phoneNumValidation, } from '@/stores/signup'; -import NextBtn from '@/components/Button/NextBtn'; -import ModalBtn from '@/components/Button/ModalBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; +import ModalBtn from '@/components/common/Button/ModalBtn'; import { bankNameAtom } from '@/stores/bankName'; import { overlay } from 'overlay-kit'; import { ModalType } from '@/types/modal/riseUp'; diff --git a/src/components/Content/SInfoModify/index.tsx b/src/components/Modal/ModalContent/SInfoModify/index.tsx similarity index 100% rename from src/components/Content/SInfoModify/index.tsx rename to src/components/Modal/ModalContent/SInfoModify/index.tsx diff --git a/src/components/Content/SNotRegistered/SNotRegistered.styled.ts b/src/components/Modal/ModalContent/SNotRegistered/SNotRegistered.styled.ts similarity index 100% rename from src/components/Content/SNotRegistered/SNotRegistered.styled.ts rename to src/components/Modal/ModalContent/SNotRegistered/SNotRegistered.styled.ts diff --git a/src/components/Content/SNotRegistered/SNotRegistered.tsx b/src/components/Modal/ModalContent/SNotRegistered/SNotRegistered.tsx similarity index 94% rename from src/components/Content/SNotRegistered/SNotRegistered.tsx rename to src/components/Modal/ModalContent/SNotRegistered/SNotRegistered.tsx index 19291d38..fc3d099b 100644 --- a/src/components/Content/SNotRegistered/SNotRegistered.tsx +++ b/src/components/Modal/ModalContent/SNotRegistered/SNotRegistered.tsx @@ -5,7 +5,7 @@ import { PNRTitle, } from './SNotRegistered.styled'; import Image from 'next/image'; -import x_icon from '../../../../public/x.png'; +import x_icon from '../../../../../public/x.png'; import { PROFILE_NOT_REGISTERED } from '@/constants/modal/dimmedModal'; import { useRouter } from 'next/navigation'; diff --git a/src/components/Content/SNotRegistered/index.tsx b/src/components/Modal/ModalContent/SNotRegistered/index.tsx similarity index 100% rename from src/components/Content/SNotRegistered/index.tsx rename to src/components/Modal/ModalContent/SNotRegistered/index.tsx diff --git a/src/components/Content/SelectCalendar/SelectCalendar.styled.ts b/src/components/Modal/ModalContent/SelectCalendar/SelectCalendar.styled.ts similarity index 100% rename from src/components/Content/SelectCalendar/SelectCalendar.styled.ts rename to src/components/Modal/ModalContent/SelectCalendar/SelectCalendar.styled.ts diff --git a/src/components/Content/SelectCalendar/SelectCalendar.tsx b/src/components/Modal/ModalContent/SelectCalendar/SelectCalendar.tsx similarity index 99% rename from src/components/Content/SelectCalendar/SelectCalendar.tsx rename to src/components/Modal/ModalContent/SelectCalendar/SelectCalendar.tsx index 870a1f94..ec60bc0b 100644 --- a/src/components/Content/SelectCalendar/SelectCalendar.tsx +++ b/src/components/Modal/ModalContent/SelectCalendar/SelectCalendar.tsx @@ -6,7 +6,7 @@ import { SelectCalendarTimeList, } from './SelectCalendar.styled'; import Image from 'next/image'; -import back_arrow from '../../../../public/arrow.png'; +import back_arrow from '../../../../../public/arrow.png'; import Calendar from 'react-calendar'; import React, { useEffect, useState } from 'react'; import { SelectedDate } from '@/types/content/selectCalendar'; diff --git a/src/components/Content/SelectCalendar/index.tsx b/src/components/Modal/ModalContent/SelectCalendar/index.tsx similarity index 100% rename from src/components/Content/SelectCalendar/index.tsx rename to src/components/Modal/ModalContent/SelectCalendar/index.tsx diff --git a/src/components/Content/SeniorMyProfile/SeniorMyProfile.styled.ts b/src/components/Modal/ModalContent/SeniorMyProfile/SeniorMyProfile.styled.ts similarity index 100% rename from src/components/Content/SeniorMyProfile/SeniorMyProfile.styled.ts rename to src/components/Modal/ModalContent/SeniorMyProfile/SeniorMyProfile.styled.ts diff --git a/src/components/Content/SeniorMyProfile/SeniorMyProfile.tsx b/src/components/Modal/ModalContent/SeniorMyProfile/SeniorMyProfile.tsx similarity index 89% rename from src/components/Content/SeniorMyProfile/SeniorMyProfile.tsx rename to src/components/Modal/ModalContent/SeniorMyProfile/SeniorMyProfile.tsx index 52ee5705..53f4bee4 100644 --- a/src/components/Content/SeniorMyProfile/SeniorMyProfile.tsx +++ b/src/components/Modal/ModalContent/SeniorMyProfile/SeniorMyProfile.tsx @@ -9,18 +9,18 @@ import { EditBtn, } from './SeniorMyProfile.styled'; import Image from 'next/image'; -import x_icon from '../../../../public/x.png'; -import user_icon from '../../../../public/user.png'; -import RoundedImage from '@/components/Image/RoundedImage'; -import AuthLabeledText from '@/components/Text/AuthLabeledText'; -import DividedText from '@/components/Text/DividedText'; -import BorderedText from '@/components/Text/BorderedText'; -import TextField from '@/components/Text/TextField'; +import x_icon from '../../../../../public/x.png'; +import user_icon from '../../../../../public/user.png'; +import RoundedImage from '@/components/common/RoundedImage'; +import AuthLabeledText from '@/components/common/Text/AuthLabeledText'; +import DividedText from '@/components/common/Text/DividedText'; +import BorderedText from '@/components/common/Text/BorderedText'; +import TextField from '@/components/common/Text/TextField'; import { useAtomValue } from 'jotai'; import { mySeniorId } from '@/stores/senior'; import { useEffect, useState } from 'react'; import axios from 'axios'; -import NextBtn from '@/components/Button/NextBtn'; +import NextBtn from '@/components/common/Button/NextBtn'; function SeniorMyProfile({ modalHandler }: { modalHandler: () => void }) { const [flag, setFlag] = useState(false); // 예외처리용 flag diff --git a/src/components/Content/SeniorMyProfile/index.tsx b/src/components/Modal/ModalContent/SeniorMyProfile/index.tsx similarity index 100% rename from src/components/Content/SeniorMyProfile/index.tsx rename to src/components/Modal/ModalContent/SeniorMyProfile/index.tsx diff --git a/src/components/Content/SuccessFail/SuccessFail.styled.ts b/src/components/Modal/ModalContent/SuccessFail/SuccessFail.styled.ts similarity index 100% rename from src/components/Content/SuccessFail/SuccessFail.styled.ts rename to src/components/Modal/ModalContent/SuccessFail/SuccessFail.styled.ts diff --git a/src/components/Content/SuccessFail/SuccessFail.tsx b/src/components/Modal/ModalContent/SuccessFail/SuccessFail.tsx similarity index 92% rename from src/components/Content/SuccessFail/SuccessFail.tsx rename to src/components/Modal/ModalContent/SuccessFail/SuccessFail.tsx index dffa1e9f..2c916e18 100644 --- a/src/components/Content/SuccessFail/SuccessFail.tsx +++ b/src/components/Modal/ModalContent/SuccessFail/SuccessFail.tsx @@ -2,8 +2,8 @@ import { SMCancelSuccessAtom } from '@/stores/condition'; import { useAtomValue } from 'jotai'; import React from 'react'; import Image from 'next/image'; -import acceptImage from '../../../../public/cState.png'; -import acceptNonImage from '../../../../public/state.png'; +import acceptImage from '../../../../../public/cState.png'; +import acceptNonImage from '../../../../../public/state.png'; import { OkayBtn, SuccessTop, MCSub } from './SuccessFail.styled'; function SuccessFail({ modalHandler }: { modalHandler: () => void }) { diff --git a/src/components/KakaoOpenChat/index.tsx b/src/components/Modal/ModalContent/SuccessFail/index.tsx similarity index 100% rename from src/components/KakaoOpenChat/index.tsx rename to src/components/Modal/ModalContent/SuccessFail/index.tsx diff --git a/src/components/Modal/RiseUpModal/RiseUpModal.tsx b/src/components/Modal/RiseUpModal/RiseUpModal.tsx index 03f45e3c..1491bad6 100644 --- a/src/components/Modal/RiseUpModal/RiseUpModal.tsx +++ b/src/components/Modal/RiseUpModal/RiseUpModal.tsx @@ -1,9 +1,9 @@ import { RiseUpModalProps } from '@/types/modal/riseUp'; import { ModalBackground } from './RiseUpModal.styled'; -import SearchForm from '@/components/SingleForm/SearchForm'; -import SelectForm from '@/components/SingleForm/SelectForm'; -import KeywordForm from '@/components/SingleForm/KeywordForm/KeywordForm'; -import BankForm from '@/components/SingleForm/BankForm'; +import SearchForm from '@/components/Form/SearchForm'; +import SelectForm from '@/components/Form/SelectForm'; +import KeywordForm from '@/components/Form/KeywordForm/KeywordForm'; +import BankForm from '@/components/Form/BankForm'; import { WishSeniorApplyAgreeModal } from '@/app/apply-wanted-senior/(components)/(modal)/WishSeniorApplyAgreeModal'; function RiseUpModal(props: RiseUpModalProps) { @@ -38,4 +38,3 @@ function RiseUpModal(props: RiseUpModalProps) { } export default RiseUpModal; - diff --git a/src/components/Modal/SearchModal/SearchModal.tsx b/src/components/Modal/SearchModal/SearchModal.tsx index ab115990..711c4cc1 100644 --- a/src/components/Modal/SearchModal/SearchModal.tsx +++ b/src/components/Modal/SearchModal/SearchModal.tsx @@ -3,7 +3,7 @@ import { SearchModalBgBox, SearchModalInput } from './SearchModal.styled'; import { SearchModalProps } from '@/types/modal/search'; import Image from 'next/image'; import search from '../../../../public/search2.png'; -import HomeSearchForm from '@/components/SingleForm/HomeSearchForm/HomeSearchForm'; +import HomeSearchForm from '@/components/Form/HomeSearchForm/HomeSearchForm'; export default function SearchModal(props: SearchModalProps) { const ModalClick = () => { props.modalHandler(); diff --git a/src/components/Modal/ShortRiseUpModal/ShortRiseUpModal.tsx b/src/components/Modal/ShortRiseUpModal/ShortRiseUpModal.tsx index a1c8dc6a..8fe1d768 100644 --- a/src/components/Modal/ShortRiseUpModal/ShortRiseUpModal.tsx +++ b/src/components/Modal/ShortRiseUpModal/ShortRiseUpModal.tsx @@ -1,6 +1,6 @@ import { ShortRiseUpModalProps } from '@/types/modal/shortRiseUp'; import { ModalBackground } from './ShortRiseUpModal.styled'; -import PayAmount from '@/components/Content/PayAmount'; +import PayAmount from '@/components/Modal/ModalContent/PayAmount'; function ShortRiseUpModal(props: ShortRiseUpModalProps) { return ( diff --git a/src/components/SuggestModal/SuggestModal.styled.ts b/src/components/Modal/SuggestModal/SuggestModal.styled.ts similarity index 100% rename from src/components/SuggestModal/SuggestModal.styled.ts rename to src/components/Modal/SuggestModal/SuggestModal.styled.ts diff --git a/src/components/SuggestModal/SuggestModal.tsx b/src/components/Modal/SuggestModal/SuggestModal.tsx similarity index 94% rename from src/components/SuggestModal/SuggestModal.tsx rename to src/components/Modal/SuggestModal/SuggestModal.tsx index 2e9eec17..98d15948 100644 --- a/src/components/SuggestModal/SuggestModal.tsx +++ b/src/components/Modal/SuggestModal/SuggestModal.tsx @@ -1,8 +1,8 @@ import React from 'react'; import Image from 'next/image'; -import x_icon from '../../../public/x_gray.png'; +import x_icon from '../../../../public/x_gray.png'; import { SMFontGray } from './SuggestModal.styled'; -import NextBtn from '../Button/NextBtn'; +import NextBtn from '../../common/Button/NextBtn'; import { useRouter } from 'next/navigation'; interface SuggestModalProps { modalHandler: () => void; diff --git a/src/components/LogoLayer/index.tsx b/src/components/Modal/SuggestModal/index.tsx similarity index 100% rename from src/components/LogoLayer/index.tsx rename to src/components/Modal/SuggestModal/index.tsx diff --git a/src/components/NaverPoint/NaverPoint.styled.ts b/src/components/NaverPoint/NaverPoint.styled.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/src/components/NaverPoint/NaverPoint.tsx b/src/components/NaverPoint/NaverPoint.tsx deleted file mode 100644 index d7e2b666..00000000 --- a/src/components/NaverPoint/NaverPoint.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import useAuth from '@/hooks/useAuth'; - -function NaverPoint() { - const { getUserType } = useAuth(); - const userType = getUserType(); - - return ( -
- {userType === 'junior' &&
리뷰쓰고, 1000네이버 포인트 받기
} -
- ); -} - -export default NaverPoint; diff --git a/src/components/SuggestModal/index.tsx b/src/components/SuggestModal/index.tsx deleted file mode 100644 index e69de29b..00000000 diff --git a/src/components/Button/AccountShowBtn/AccountShowBtn.styled.ts b/src/components/common/Button/AccountShowBtn/AccountShowBtn.styled.ts similarity index 100% rename from src/components/Button/AccountShowBtn/AccountShowBtn.styled.ts rename to src/components/common/Button/AccountShowBtn/AccountShowBtn.styled.ts diff --git a/src/components/Button/AccountShowBtn/AccountShowBtn.tsx b/src/components/common/Button/AccountShowBtn/AccountShowBtn.tsx similarity index 100% rename from src/components/Button/AccountShowBtn/AccountShowBtn.tsx rename to src/components/common/Button/AccountShowBtn/AccountShowBtn.tsx diff --git a/src/components/Mentoring/MentoringCancel/index.tsx b/src/components/common/Button/AccountShowBtn/index.tsx similarity index 100% rename from src/components/Mentoring/MentoringCancel/index.tsx rename to src/components/common/Button/AccountShowBtn/index.tsx diff --git a/src/components/Button/ApplyCancleBtn/ApplyCancleBtn.styled.ts b/src/components/common/Button/ApplyCancleBtn/ApplyCancleBtn.styled.ts similarity index 100% rename from src/components/Button/ApplyCancleBtn/ApplyCancleBtn.styled.ts rename to src/components/common/Button/ApplyCancleBtn/ApplyCancleBtn.styled.ts diff --git a/src/components/Button/ApplyCancleBtn/ApplyCancleBtn.tsx b/src/components/common/Button/ApplyCancleBtn/ApplyCancleBtn.tsx similarity index 100% rename from src/components/Button/ApplyCancleBtn/ApplyCancleBtn.tsx rename to src/components/common/Button/ApplyCancleBtn/ApplyCancleBtn.tsx diff --git a/src/components/Button/ApplyCancleBtn/index.tsx b/src/components/common/Button/ApplyCancleBtn/index.tsx similarity index 100% rename from src/components/Button/ApplyCancleBtn/index.tsx rename to src/components/common/Button/ApplyCancleBtn/index.tsx diff --git a/src/components/Button/ClickedBtn/ClickedBtn.styled.ts b/src/components/common/Button/ClickedBtn/ClickedBtn.styled.ts similarity index 100% rename from src/components/Button/ClickedBtn/ClickedBtn.styled.ts rename to src/components/common/Button/ClickedBtn/ClickedBtn.styled.ts diff --git a/src/components/Button/ClickedBtn/ClickedBtn.tsx b/src/components/common/Button/ClickedBtn/ClickedBtn.tsx similarity index 100% rename from src/components/Button/ClickedBtn/ClickedBtn.tsx rename to src/components/common/Button/ClickedBtn/ClickedBtn.tsx diff --git a/src/components/Button/ClickedBtn/index.tsx b/src/components/common/Button/ClickedBtn/index.tsx similarity index 100% rename from src/components/Button/ClickedBtn/index.tsx rename to src/components/common/Button/ClickedBtn/index.tsx diff --git a/src/components/Button/ModalBtn/ModalBtn.styled.ts b/src/components/common/Button/ModalBtn/ModalBtn.styled.ts similarity index 100% rename from src/components/Button/ModalBtn/ModalBtn.styled.ts rename to src/components/common/Button/ModalBtn/ModalBtn.styled.ts diff --git a/src/components/Button/ModalBtn/ModalBtn.tsx b/src/components/common/Button/ModalBtn/ModalBtn.tsx similarity index 95% rename from src/components/Button/ModalBtn/ModalBtn.tsx rename to src/components/common/Button/ModalBtn/ModalBtn.tsx index c0d06a2d..b3721ae1 100644 --- a/src/components/Button/ModalBtn/ModalBtn.tsx +++ b/src/components/common/Button/ModalBtn/ModalBtn.tsx @@ -2,7 +2,7 @@ import React, { forwardRef } from 'react'; import { ModalBtnProps } from '@/types/button/modalBtn'; import { StyledSModalBtn, SInfoBtn, StyledMSBtn } from './ModalBtn.styled'; import Image from 'next/image'; -import down from '../../../../public/arrow-down-gray.png'; +import down from '../../../../../public/arrow-down-gray.png'; const ModalBtn = forwardRef((props, ref) => { const handleClick = () => { diff --git a/src/components/Button/ModalBtn/index.tsx b/src/components/common/Button/ModalBtn/index.tsx similarity index 100% rename from src/components/Button/ModalBtn/index.tsx rename to src/components/common/Button/ModalBtn/index.tsx diff --git a/src/components/Button/NextBtn/NextBtn.styled.ts b/src/components/common/Button/NextBtn/NextBtn.styled.ts similarity index 100% rename from src/components/Button/NextBtn/NextBtn.styled.ts rename to src/components/common/Button/NextBtn/NextBtn.styled.ts diff --git a/src/components/Button/NextBtn/NextBtn.tsx b/src/components/common/Button/NextBtn/NextBtn.tsx similarity index 100% rename from src/components/Button/NextBtn/NextBtn.tsx rename to src/components/common/Button/NextBtn/NextBtn.tsx diff --git a/src/components/Button/NextBtn/index.tsx b/src/components/common/Button/NextBtn/index.tsx similarity index 100% rename from src/components/Button/NextBtn/index.tsx rename to src/components/common/Button/NextBtn/index.tsx diff --git a/src/components/Button/SelectedBtn/SelectedBtn.styled.ts b/src/components/common/Button/SelectedBtn/SelectedBtn.styled.ts similarity index 100% rename from src/components/Button/SelectedBtn/SelectedBtn.styled.ts rename to src/components/common/Button/SelectedBtn/SelectedBtn.styled.ts diff --git a/src/components/Button/SelectedBtn/SelectedBtn.tsx b/src/components/common/Button/SelectedBtn/SelectedBtn.tsx similarity index 93% rename from src/components/Button/SelectedBtn/SelectedBtn.tsx rename to src/components/common/Button/SelectedBtn/SelectedBtn.tsx index db35c06b..2ef8d1c4 100644 --- a/src/components/Button/SelectedBtn/SelectedBtn.tsx +++ b/src/components/common/Button/SelectedBtn/SelectedBtn.tsx @@ -2,7 +2,7 @@ import { SelectedBtnProps } from '@/types/button/selectedBtn'; import { StyledSelectedBtn } from './SelectedBtn.styled'; import { useEffect, useState } from 'react'; import Image from 'next/image'; -import selected_x from '../../../../public/selected-cancel.png'; +import selected_x from '../../../../../public/selected-cancel.png'; function SelectedBtn(props: SelectedBtnProps) { const [selected, setSelected] = useState(false); diff --git a/src/components/Button/SelectedBtn/index.tsx b/src/components/common/Button/SelectedBtn/index.tsx similarity index 100% rename from src/components/Button/SelectedBtn/index.tsx rename to src/components/common/Button/SelectedBtn/index.tsx diff --git a/src/components/Button/SignUpBtn/SignUpBtn.styled.ts b/src/components/common/Button/SignUpBtn/SignUpBtn.styled.ts similarity index 100% rename from src/components/Button/SignUpBtn/SignUpBtn.styled.ts rename to src/components/common/Button/SignUpBtn/SignUpBtn.styled.ts diff --git a/src/components/Button/SignUpBtn/SignUpBtn.tsx b/src/components/common/Button/SignUpBtn/SignUpBtn.tsx similarity index 66% rename from src/components/Button/SignUpBtn/SignUpBtn.tsx rename to src/components/common/Button/SignUpBtn/SignUpBtn.tsx index 7a0c049a..fed18456 100644 --- a/src/components/Button/SignUpBtn/SignUpBtn.tsx +++ b/src/components/common/Button/SignUpBtn/SignUpBtn.tsx @@ -1,14 +1,10 @@ 'use client'; import useAuth from '@/hooks/useAuth'; -import { - changeNickname, - nickname, - phoneNum, - socialIdAtom, -} from '@/stores/signup'; +import { changeNickname, phoneNum } from '@/stores/signup'; import axios from 'axios'; import { useAtomValue } from 'jotai'; -import { useRouter, usePathname } from 'next/navigation'; +import { useRouter } from 'next/navigation'; +import { useSignUpUser } from '@/hooks/mutations/useSignupUser'; import { SignUpBtnContainer, SignUpBtnNonContainer } from './SignUpBtn.styled'; import { option } from '@/stores/condition'; import { @@ -16,20 +12,18 @@ import { desiredFieldLen, desiredSchool, desiredSchoolLen, - matchingReceiveAtom, } from '@/stores/matching'; import findExCode from '@/utils/findExCode'; import { useEffect, useState } from 'react'; +import { useToast } from '@/hooks/useToast'; function SignUpBtn() { const [socialId, setSocialId] = useState(null); - // const nickName = useAtomValue(nickname); const nickName = useAtomValue(changeNickname); const phoneNumber = useAtomValue(phoneNum); const marketingReceive = useAtomValue(option); const major = useAtomValue(desiredSchool); const field = useAtomValue(desiredField); - const matchingReceive = useAtomValue(matchingReceiveAtom); const schoolCharCount = useAtomValue(desiredSchoolLen); const fieldCharCount = useAtomValue(desiredFieldLen); const router = useRouter(); @@ -42,8 +36,11 @@ function SignUpBtn() { removeTokens, } = useAuth(); + const { addToast } = useToast(); + const { mutate: signupUser } = useSignUpUser(); + useEffect(() => { - if (typeof window !== undefined) { + if (typeof window !== 'undefined') { const socialId = window.localStorage.getItem('socialId'); const socialIdNum = socialId ? parseInt(socialId) : null; setSocialId(socialIdNum); @@ -55,19 +52,18 @@ function SignUpBtn() { // 선배 -> 후배 변경 회원 if (accessTkn) { const userT = getUserType(); - if (userT == 'junior') { + if (userT === 'junior') { router.push('/'); return; } - if (userT == 'senior' && major && field) { + if (userT === 'senior' && major && field) { axios .post( `${process.env.NEXT_PUBLIC_SERVER_URL}/auth/user/change`, { major: major, field: field, - matchingReceive: matchingReceive, }, { headers: { @@ -84,7 +80,7 @@ function SignUpBtn() { return; } - if (res.code == 'AU202') { + if (res.code === 'AU202') { setAccessToken({ token: res.data.accessToken, expires: res.data.accessExpiration, @@ -107,52 +103,47 @@ function SignUpBtn() { }); if (socialId && nickName) { - axios - .post(`${process.env.NEXT_PUBLIC_SERVER_URL}/auth/user/signup`, { + signupUser( + { socialId, nickName, phoneNumber, marketingReceive, - major, - field, - matchingReceive, - }) - .then((res) => { - const response = res.data; - if (response.code == 'AU202') { + }, + { + onError: () => { + addToast({ + message: '회원가입을 할 수 없습니다. 잠시 후 다시 시도해주세요', + status: 'error', + }); + }, + onSuccess: (data) => { setAccessToken({ - token: response.data.accessToken, - expires: response.data.accessExpiration, + token: data.accessToken, + expires: data.accessExpiration, }); setRefreshToken({ - token: response.data.refreshToken, - expires: response.data.refreshExpiration, + token: data.refreshToken, + expires: data.refreshExpiration, }); - setUserType(response.data.role); - + setUserType(data.role); router.push('/signup/done'); - } - }) - .catch((err) => { - console.error(err); - }); + }, + }, + ); } }; return ( <> - {(matchingReceive ? schoolCharCount && fieldCharCount : true) ? ( - <> - - 가입완료 하기 - - + {schoolCharCount && fieldCharCount ? ( + + 가입완료 하기 + ) : ( - <> - - 가입완료 하기 - - + + 가입완료 하기 + )} ); diff --git a/src/components/Button/SignUpBtn/index.tsx b/src/components/common/Button/SignUpBtn/index.tsx similarity index 100% rename from src/components/Button/SignUpBtn/index.tsx rename to src/components/common/Button/SignUpBtn/index.tsx diff --git a/src/components/Button/TypeBtn/TypeBtn.styled.ts b/src/components/common/Button/TypeBtn/TypeBtn.styled.ts similarity index 100% rename from src/components/Button/TypeBtn/TypeBtn.styled.ts rename to src/components/common/Button/TypeBtn/TypeBtn.styled.ts diff --git a/src/components/Button/TypeBtn/TypeBtn.tsx b/src/components/common/Button/TypeBtn/TypeBtn.tsx similarity index 100% rename from src/components/Button/TypeBtn/TypeBtn.tsx rename to src/components/common/Button/TypeBtn/TypeBtn.tsx diff --git a/src/components/Button/TypeBtn/index.tsx b/src/components/common/Button/TypeBtn/index.tsx similarity index 100% rename from src/components/Button/TypeBtn/index.tsx rename to src/components/common/Button/TypeBtn/index.tsx diff --git a/src/components/Checkbox/CheckBox.styled.ts b/src/components/common/Checkbox/CheckBox.styled.ts similarity index 100% rename from src/components/Checkbox/CheckBox.styled.ts rename to src/components/common/Checkbox/CheckBox.styled.ts diff --git a/src/components/Checkbox/CheckBox.tsx b/src/components/common/Checkbox/CheckBox.tsx similarity index 80% rename from src/components/Checkbox/CheckBox.tsx rename to src/components/common/Checkbox/CheckBox.tsx index 12ca8a83..06a65b09 100644 --- a/src/components/Checkbox/CheckBox.tsx +++ b/src/components/common/Checkbox/CheckBox.tsx @@ -1,8 +1,8 @@ 'use client'; import React from 'react'; -import checkedIcon from '../../../public/checkbox_o.png'; -import uncheckedIcon from '../../../public/checkbox_x.png'; -import cancelIcon from '../../../public/checkbox_c.png'; +import checkedIcon from '../../../../public/checkbox_o.png'; +import uncheckedIcon from '../../../../public/checkbox_x.png'; +import cancelIcon from '../../../../public/checkbox_c.png'; type CheckboxProps = { checked: boolean; diff --git a/src/components/Checkbox/index.tsx b/src/components/common/Checkbox/index.tsx similarity index 100% rename from src/components/Checkbox/index.tsx rename to src/components/common/Checkbox/index.tsx diff --git a/src/components/DropDown/SearchDropDown/SearchDropDown.tsx b/src/components/common/DropDown/SearchDropDown/SearchDropDown.tsx similarity index 100% rename from src/components/DropDown/SearchDropDown/SearchDropDown.tsx rename to src/components/common/DropDown/SearchDropDown/SearchDropDown.tsx diff --git a/src/components/DropDown/SearchDropDown/index.tsx b/src/components/common/DropDown/SearchDropDown/index.tsx similarity index 100% rename from src/components/DropDown/SearchDropDown/index.tsx rename to src/components/common/DropDown/SearchDropDown/index.tsx diff --git a/src/components/DropDown/common/DropDown.tsx b/src/components/common/DropDown/common/DropDown.tsx similarity index 100% rename from src/components/DropDown/common/DropDown.tsx rename to src/components/common/DropDown/common/DropDown.tsx diff --git a/src/components/DropDown/common/DropdownHeader.tsx b/src/components/common/DropDown/common/DropdownHeader.tsx similarity index 100% rename from src/components/DropDown/common/DropdownHeader.tsx rename to src/components/common/DropDown/common/DropdownHeader.tsx diff --git a/src/components/DropDown/common/DropdownItem.tsx b/src/components/common/DropDown/common/DropdownItem.tsx similarity index 100% rename from src/components/DropDown/common/DropdownItem.tsx rename to src/components/common/DropDown/common/DropdownItem.tsx diff --git "a/src/components/DropDown/common/\bDropdownMenu.tsx" b/src/components/common/DropDown/common/DropdownMenu.tsx similarity index 100% rename from "src/components/DropDown/common/\bDropdownMenu.tsx" rename to src/components/common/DropDown/common/DropdownMenu.tsx diff --git a/src/components/DropDown/common/TriggerButton.tsx b/src/components/common/DropDown/common/TriggerButton.tsx similarity index 100% rename from src/components/DropDown/common/TriggerButton.tsx rename to src/components/common/DropDown/common/TriggerButton.tsx diff --git a/src/components/DropDown/common/index.ts b/src/components/common/DropDown/common/index.ts similarity index 87% rename from src/components/DropDown/common/index.ts rename to src/components/common/DropDown/common/index.ts index 9479485a..9d9ebcbc 100644 --- a/src/components/DropDown/common/index.ts +++ b/src/components/common/DropDown/common/index.ts @@ -1,7 +1,7 @@ import { Dropdown as DropDown } from './DropDown'; import { TriggerButton } from './TriggerButton'; import { DropdownHeader } from './DropdownHeader'; -import { DropdownList } from './\bDropdownMenu'; +import { DropdownList } from './DropdownMenu'; import { DropdownItem } from './DropdownItem'; export const Dropdown = { diff --git a/src/components/DropDown/common/useDropdown.tsx b/src/components/common/DropDown/common/useDropdown.tsx similarity index 100% rename from src/components/DropDown/common/useDropdown.tsx rename to src/components/common/DropDown/common/useDropdown.tsx diff --git a/src/components/Footer/Footer.styled.ts b/src/components/common/Footer/Footer.styled.ts similarity index 100% rename from src/components/Footer/Footer.styled.ts rename to src/components/common/Footer/Footer.styled.ts diff --git a/src/components/Footer/Footer.tsx b/src/components/common/Footer/Footer.tsx similarity index 91% rename from src/components/Footer/Footer.tsx rename to src/components/common/Footer/Footer.tsx index bce7ee35..1a451bc3 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/common/Footer/Footer.tsx @@ -1,7 +1,6 @@ import Image from 'next/image'; import Link from 'next/link'; -import Logo from '../../../public/logo.png'; -import InstaGram from '../../../public/instagram.png'; + import { TEMRS_LINK } from '@/constants/terms/terms'; import styled from 'styled-components'; @@ -89,7 +88,7 @@ function Footer() { 대학원 김선배 로고 이미지마케팅 제휴 문의 grad.kimseonbae@gmail.com
- 인스타그램 링크 이미지 diff --git a/src/components/Footer/index.tsx b/src/components/common/Footer/index.tsx similarity index 100% rename from src/components/Footer/index.tsx rename to src/components/common/Footer/index.tsx diff --git a/src/components/GA/GA.jsx b/src/components/common/GA/GA.jsx similarity index 100% rename from src/components/GA/GA.jsx rename to src/components/common/GA/GA.jsx diff --git a/src/components/GA/GTM.jsx b/src/components/common/GA/GTM.jsx similarity index 100% rename from src/components/GA/GTM.jsx rename to src/components/common/GA/GTM.jsx diff --git a/src/components/Header/BackHeader/BackHeader.styled.ts b/src/components/common/Header/BackHeader/BackHeader.styled.ts similarity index 100% rename from src/components/Header/BackHeader/BackHeader.styled.ts rename to src/components/common/Header/BackHeader/BackHeader.styled.ts diff --git a/src/components/Header/BackHeader/BackHeader.tsx b/src/components/common/Header/BackHeader/BackHeader.tsx similarity index 93% rename from src/components/Header/BackHeader/BackHeader.tsx rename to src/components/common/Header/BackHeader/BackHeader.tsx index 4fde1500..6fd4ca85 100644 --- a/src/components/Header/BackHeader/BackHeader.tsx +++ b/src/components/common/Header/BackHeader/BackHeader.tsx @@ -1,6 +1,6 @@ import { BackHeaderContainer } from './BackHeader.styled'; import Image from 'next/image'; -import back_arrow from '../../../../public/arrow.png'; +import back_arrow from '../../../../../public/arrow.png'; import { useRouter } from 'next/navigation'; interface BackHeaderProps { headerText: string; diff --git a/src/components/Header/BackHeader/index.tsx b/src/components/common/Header/BackHeader/index.tsx similarity index 100% rename from src/components/Header/BackHeader/index.tsx rename to src/components/common/Header/BackHeader/index.tsx diff --git a/src/components/LogoLayer/LogoLayer.styled.ts b/src/components/common/LogoLayer/LogoLayer.styled.ts similarity index 100% rename from src/components/LogoLayer/LogoLayer.styled.ts rename to src/components/common/LogoLayer/LogoLayer.styled.ts diff --git a/src/components/LogoLayer/LogoLayer.tsx b/src/components/common/LogoLayer/LogoLayer.tsx similarity index 93% rename from src/components/LogoLayer/LogoLayer.tsx rename to src/components/common/LogoLayer/LogoLayer.tsx index 3e8a0702..bc680b94 100644 --- a/src/components/LogoLayer/LogoLayer.tsx +++ b/src/components/common/LogoLayer/LogoLayer.tsx @@ -3,11 +3,9 @@ import Image from 'next/image'; import logo from '@/../../public/logo.png'; import search from '@/../../public/search.png'; import { HomeTopLayer, Logo } from './LogoLayer.styled'; -import useModal from '@/hooks/useModal'; -import Login from '../kakao/login'; +import Login from './login'; import { SearchModalProps } from '@/types/modal/search'; import useAuth from '@/hooks/useAuth'; -import Router from 'next/navigation'; import { useRouter } from 'next/navigation'; function LogoLayer(props: SearchModalProps) { const [isLogin, setIsLogin] = useState(false); diff --git a/src/components/Mentoring/MentoringSpec/SmentoringSpec/index.tsx b/src/components/common/LogoLayer/index.tsx similarity index 100% rename from src/components/Mentoring/MentoringSpec/SmentoringSpec/index.tsx rename to src/components/common/LogoLayer/index.tsx diff --git a/src/components/kakao/login.tsx b/src/components/common/LogoLayer/login.tsx similarity index 100% rename from src/components/kakao/login.tsx rename to src/components/common/LogoLayer/login.tsx diff --git a/src/components/common/Pagination/SeniorListPagination.tsx b/src/components/common/Pagination/SeniorListPagination.tsx new file mode 100644 index 00000000..65c4b365 --- /dev/null +++ b/src/components/common/Pagination/SeniorListPagination.tsx @@ -0,0 +1,83 @@ +import { useSeniorListPageSearchParams } from '@/hooks/search-params/useSeniorListSearchParams'; + +import { + Pagination, + PaginationContent, + PaginationItem, + PaginationLink, + PaginationNext, + PaginationPrev, +} from '.'; + +import type { HTMLAttributes } from 'react'; + +interface SeniorListPaginationProps { + totalPage: number; + displayPage?: number; +} + +export function SeniorListPagination({ + totalPage, + ...props +}: SeniorListPaginationProps & HTMLAttributes) { + const { page, setPage } = useSeniorListPageSearchParams(); + const handlePrev = () => { + if (page === 1) { + return; + } + setPage(page - 1); + }; + + const handleNext = () => { + if (page === totalPage) { + return; + } + setPage(page + 1); + }; + + const displayPage = 5; + + const startPage = Math.max( + 1, + Math.floor((page - 1) / displayPage) * displayPage + 1, + ); + + const endPage = Math.min(startPage + displayPage - 1, totalPage); + const pages = Array.from( + { length: endPage - startPage + 1 }, + (_, i) => startPage + i, + ); + + return ( + + + + + + {pages.map((i) => ( + + setPage(i)} + > + {i} + + + ))} + + + + + + + ); +} diff --git a/src/components/common/Pagination/index.css b/src/components/common/Pagination/index.css new file mode 100644 index 00000000..33ba56c4 --- /dev/null +++ b/src/components/common/Pagination/index.css @@ -0,0 +1,41 @@ +.pagination { + margin-left: auto; + margin-right: auto; + display: flex; + width: 100%; + color: #4c4d4e; + justify-content: center; +} + +.pagination-content { + display: flex; + flex-direction: row; + list-style-type: none; + align-items: center; + > li { + width: 28px; + height: 28px; + display: flex; + justify-content: center; + align-items: center; + } + gap: 8px; +} + +.pagination-link { + color: #4c4d4e; + width: 100%; + height: 100%; + border-radius: 4px; + font-size: 14px; + font-weight: 500; + text-decoration: none; + display: flex; + justify-content: center; + align-items: center; +} + +.pagination-link.active { + font-weight: 510; + background-color: #d3eeeb; +} diff --git a/src/components/common/Pagination/index.tsx b/src/components/common/Pagination/index.tsx new file mode 100644 index 00000000..dcd47dba --- /dev/null +++ b/src/components/common/Pagination/index.tsx @@ -0,0 +1,102 @@ +import React, { ReactNode } from 'react'; +import './index.css'; +import Link, { LinkProps } from 'next/link'; + +interface PaginationProps extends React.ComponentProps<'nav'> {} + +const Pagination = ({ ...props }: PaginationProps) => ( +
)} - {seniorListData?.totalElements !== 0 && ( - setCurrentSeniorListPage(page)} - count={Math.ceil( - (seniorListData?.totalElements as number) / - SeniorListPerPageCount, - )} - aria-label="선배 회원 페이지네이션" - role="navigation" - /> - )} + +