diff --git a/Templates/EmailRegister/assets/garotaAcenando.png b/Templates/EmailRegister/assets/garotaAcenando.png deleted file mode 100644 index b574a27f..00000000 Binary files a/Templates/EmailRegister/assets/garotaAcenando.png and /dev/null differ diff --git a/Templates/EmailRegister/index.html b/Templates/EmailRegister/index.html index 75fabaa6..4266031b 100644 --- a/Templates/EmailRegister/index.html +++ b/Templates/EmailRegister/index.html @@ -15,7 +15,7 @@ @@ -25,7 +25,7 @@

Seja bem-v

diff --git a/Templates/ResetPassword/assets/garotaPC.png b/Templates/ResetPassword/assets/garotaPC.png deleted file mode 100644 index ecc3a66a..00000000 Binary files a/Templates/ResetPassword/assets/garotaPC.png and /dev/null differ diff --git a/Templates/ResetPassword/assets/sou-junior.svg b/Templates/ResetPassword/assets/sou-junior.svg deleted file mode 100644 index 79fc6cf1..00000000 --- a/Templates/ResetPassword/assets/sou-junior.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Templates/ResetPassword/index.html b/Templates/ResetPassword/index.html index 3bac082f..c48c917f 100644 --- a/Templates/ResetPassword/index.html +++ b/Templates/ResetPassword/index.html @@ -15,7 +15,7 @@
- logo SouJunior + logo SouJunior
- Garota acenando + Garota acenando
@@ -28,7 +28,7 @@ diff --git a/package-lock.json b/package-lock.json index 3cab8706..4dcf9e2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,8 +8,6 @@ "name": "portal-mentoria", "version": "0.1.0", "dependencies": { - "@emotion/react": "^11.11.1", - "@emotion/styled": "^11.11.0", "@hookform/resolvers": "^3.1.1", "@mui/icons-material": "^5.14.11", "@mui/material": "^5.14.11", @@ -19,23 +17,18 @@ "@radix-ui/react-scroll-area": "^1.0.5", "@radix-ui/react-select": "^2.0.0", "@radix-ui/react-toggle": "^1.0.3", + "@tanstack/react-query": "^5.17.15", "axios": "^1.4.0", - "better-react-carousel": "^1.1.1", "cookies-next": "^2.1.2", - "date-fns": "^2.30.0", "dayjs": "^1.11.10", "eslint-config-next": "13.4.12", "formik": "^2.4.2", "framer-motion": "^10.13.0", "next": "13.4.12", "react": "18.2.0", - "react-calendly": "^4.3.0", "react-dom": "18.2.0", "react-easy-crop": "^5.0.2", "react-fast-marquee": "^1.6.0", - "react-hook-form": "^7.45.2", - "react-image-crop": "^10.1.8", - "react-modal": "^3.16.1", "react-toastify": "^9.1.3", "styled-components": "^6.0.5", "swiper": "^10.0.4", @@ -47,7 +40,6 @@ "@types/react": "18.2.15", "@types/react-dom": "18.2.7", "@types/react-easy-crop": "^2.0.0", - "@types/react-image-crop": "^8.1.3", "@types/swiper": "^6.0.0", "eslint": "^8.54.0", "typescript": "5.1.6" @@ -2017,6 +2009,8 @@ "version": "11.11.0", "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-module-imports": "^7.16.7", "@babel/runtime": "^7.18.3", @@ -2034,12 +2028,16 @@ "node_modules/@emotion/babel-plugin/node_modules/@emotion/memoize": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", - "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==", + "optional": true, + "peer": true }, "node_modules/@emotion/babel-plugin/node_modules/stylis": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", - "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" + "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==", + "optional": true, + "peer": true }, "node_modules/@emotion/cache": { "version": "11.11.0", @@ -2066,12 +2064,15 @@ "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==" + "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==", + "optional": true, + "peer": true }, "node_modules/@emotion/is-prop-valid": { "version": "0.8.8", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", + "optional": true, "dependencies": { "@emotion/memoize": "0.7.4" } @@ -2079,12 +2080,15 @@ "node_modules/@emotion/memoize": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", - "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==" + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==", + "optional": true }, "node_modules/@emotion/react": { "version": "11.11.1", "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz", "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==", + "optional": true, + "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.11.0", @@ -2108,6 +2112,8 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz", "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==", + "optional": true, + "peer": true, "dependencies": { "@emotion/hash": "^0.9.1", "@emotion/memoize": "^0.8.1", @@ -2119,7 +2125,9 @@ "node_modules/@emotion/serialize/node_modules/@emotion/memoize": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", - "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==", + "optional": true, + "peer": true }, "node_modules/@emotion/sheet": { "version": "1.2.2", @@ -2130,6 +2138,8 @@ "version": "11.11.0", "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.0.tgz", "integrity": "sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==", + "optional": true, + "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.11.0", @@ -2152,6 +2162,8 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==", + "optional": true, + "peer": true, "dependencies": { "@emotion/memoize": "^0.8.1" } @@ -2159,7 +2171,9 @@ "node_modules/@emotion/styled/node_modules/@emotion/memoize": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", - "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==", + "optional": true, + "peer": true }, "node_modules/@emotion/unitless": { "version": "0.8.1", @@ -2170,6 +2184,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz", "integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==", + "optional": true, + "peer": true, "peerDependencies": { "react": ">=16.8.0" } @@ -3647,6 +3663,30 @@ "tslib": "^2.4.0" } }, + "node_modules/@tanstack/query-core": { + "version": "5.17.15", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.17.15.tgz", + "integrity": "sha512-QURxpu77/ICA4d61aPvV7EcJ2MwmksxUejKBaq/xLcO2TUJAlXf4PFKHC/WxnVFI/7F1jeLx85AO3Vpk0+uBXw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.17.15", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.17.15.tgz", + "integrity": "sha512-9qur91mOihaUN7pXm6ioDtS+4qgkBcCiIaZyvi3lZNcQZsrMGCYZ+eP3hiFrV4khoJyJrFUX1W0NcCVlgwNZxQ==", + "dependencies": { + "@tanstack/query-core": "5.17.15" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^18.0.0" + } + }, "node_modules/@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -3672,7 +3712,9 @@ "node_modules/@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "optional": true, + "peer": true }, "node_modules/@types/prop-types": { "version": "15.7.5", @@ -3708,15 +3750,6 @@ "react-easy-crop": "*" } }, - "node_modules/@types/react-image-crop": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/@types/react-image-crop/-/react-image-crop-8.1.3.tgz", - "integrity": "sha512-icfA+xMUQIp4/u525uNRKVZyHA/j8C1dp7yFWiGC6dqXSKXoUg5QhqUotrrzxY285LgQMgaWBRjQzXyeUAKUUA==", - "dev": true, - "dependencies": { - "@types/react": "*" - } - }, "node_modules/@types/react-transition-group": { "version": "4.4.6", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.6.tgz", @@ -4208,6 +4241,8 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", + "optional": true, + "peer": true, "dependencies": { "@babel/runtime": "^7.12.5", "cosmiconfig": "^7.0.0", @@ -4266,6 +4301,8 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.1.4.tgz", "integrity": "sha512-Xgp9g+A/cG47sUyRwwYxGM4bR/jDRg5N6it/8+HxCnbT5XNKSKDT9xm4oag/osgqjC2It/vH0yXsomOG6k558g==", + "optional": true, + "peer": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", "@babel/helper-module-imports": "^7.22.5", @@ -4282,98 +4319,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/better-react-carousel": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/better-react-carousel/-/better-react-carousel-1.1.1.tgz", - "integrity": "sha512-9c+cEtWDrPi7Y29hQ4OLB0AecVAD8odTTIPVo7sAwSMbs16ANyXCf8k+U5a8ctoCE7BiTJdyIUaJAndhZuNv0Q==", - "dependencies": { - "lodash.debounce": "^4.0.8", - "prop-types": "^15.7.2", - "smoothscroll-polyfill": "^0.4.4", - "styled-components": "^4.4.1" - }, - "peerDependencies": { - "react": "^18.1.0", - "react-dom": "^18.1.0" - } - }, - "node_modules/better-react-carousel/node_modules/@emotion/unitless": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", - "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" - }, - "node_modules/better-react-carousel/node_modules/css-to-react-native": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.3.2.tgz", - "integrity": "sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw==", - "dependencies": { - "camelize": "^1.0.0", - "css-color-keywords": "^1.0.0", - "postcss-value-parser": "^3.3.0" - } - }, - "node_modules/better-react-carousel/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "engines": { - "node": ">=4" - } - }, - "node_modules/better-react-carousel/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "node_modules/better-react-carousel/node_modules/styled-components": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-4.4.1.tgz", - "integrity": "sha512-RNqj14kYzw++6Sr38n7197xG33ipEOktGElty4I70IKzQF1jzaD1U4xQ+Ny/i03UUhHlC5NWEO+d8olRCDji6g==", - "hasInstallScript": true, - "dependencies": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@emotion/is-prop-valid": "^0.8.1", - "@emotion/unitless": "^0.7.0", - "babel-plugin-styled-components": ">= 1", - "css-to-react-native": "^2.2.2", - "memoize-one": "^5.0.0", - "merge-anything": "^2.2.4", - "prop-types": "^15.5.4", - "react-is": "^16.6.0", - "stylis": "^3.5.0", - "stylis-rule-sheet": "^0.0.10", - "supports-color": "^5.5.0" - }, - "peerDependencies": { - "react": ">= 16.3.0", - "react-dom": ">= 16.3.0" - } - }, - "node_modules/better-react-carousel/node_modules/stylis": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.4.tgz", - "integrity": "sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==" - }, - "node_modules/better-react-carousel/node_modules/stylis-rule-sheet": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz", - "integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==", - "peerDependencies": { - "stylis": "^3.5.0" - } - }, - "node_modules/better-react-carousel/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", @@ -4685,6 +4630,8 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "optional": true, + "peer": true, "dependencies": { "@types/parse-json": "^4.0.0", "import-fresh": "^3.2.1", @@ -4737,21 +4684,6 @@ "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==" }, - "node_modules/date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, "node_modules/dayjs": { "version": "1.11.10", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", @@ -4922,6 +4854,8 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "optional": true, + "peer": true, "dependencies": { "is-arrayish": "^0.2.1" } @@ -5654,11 +5588,6 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/exenv": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", - "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -5739,7 +5668,9 @@ "node_modules/find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "optional": true, + "peer": true }, "node_modules/find-up": { "version": "5.0.0", @@ -6254,7 +6185,9 @@ "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "optional": true, + "peer": true }, "node_modules/is-bigint": { "version": "1.0.4", @@ -6511,11 +6444,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-what": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", - "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==" - }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -6581,7 +6509,9 @@ "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "optional": true, + "peer": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -6646,7 +6576,9 @@ "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "optional": true, + "peer": true }, "node_modules/locate-path": { "version": "6.0.0", @@ -6724,19 +6656,6 @@ "semver": "bin/semver" } }, - "node_modules/memoize-one": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", - "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" - }, - "node_modules/merge-anything": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-2.4.4.tgz", - "integrity": "sha512-l5XlriUDJKQT12bH+rVhAHjwIuXWdAIecGwsYjv2LJo+dA1AeRTmeQS+3QBpO6lEthBMDi2IUMpLC1yyRvGlwQ==", - "dependencies": { - "is-what": "^3.3.1" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -7134,6 +7053,8 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "optional": true, + "peer": true, "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -7329,19 +7250,6 @@ "node": ">=0.10.0" } }, - "node_modules/react-calendly": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/react-calendly/-/react-calendly-4.3.0.tgz", - "integrity": "sha512-JFZzYhyJBaoZDseB3UqzeOx1rbzCK24nr5pqH/6zJEh7CZ/pn5R49rkIJ0g5E7j5WQ3K7xBSgBD7WgM36v3gZw==", - "engines": { - "node": ">=8", - "npm": ">=5" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, "node_modules/react-dom": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", @@ -7390,6 +7298,7 @@ "version": "7.45.2", "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.45.2.tgz", "integrity": "sha512-9s45OdTaKN+4NSTbXVqeDITd/nwIg++nxJGL8+OD5uf1DxvhsXQ641kaYHk5K28cpIOTYm71O/fYk7rFaygb3A==", + "peer": true, "engines": { "node": ">=12.22.0" }, @@ -7401,42 +7310,11 @@ "react": "^16.8.0 || ^17 || ^18" } }, - "node_modules/react-image-crop": { - "version": "10.1.8", - "resolved": "https://registry.npmjs.org/react-image-crop/-/react-image-crop-10.1.8.tgz", - "integrity": "sha512-4rb8XtXNx7ZaOZarKKnckgz4xLMvds/YrU6mpJfGhGAsy2Mg4mIw1x+DCCGngVGq2soTBVVOxx2s/C6mTX9+pA==", - "peerDependencies": { - "react": ">=16.13.1" - } - }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, - "node_modules/react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" - }, - "node_modules/react-modal": { - "version": "3.16.1", - "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz", - "integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==", - "dependencies": { - "exenv": "^1.2.0", - "prop-types": "^15.7.2", - "react-lifecycles-compat": "^3.0.0", - "warning": "^4.0.3" - }, - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "react": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18", - "react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18" - } - }, "node_modules/react-remove-scroll": { "version": "2.5.5", "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz", @@ -7910,15 +7788,12 @@ "node": ">=8" } }, - "node_modules/smoothscroll-polyfill": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/smoothscroll-polyfill/-/smoothscroll-polyfill-0.4.4.tgz", - "integrity": "sha512-TK5ZA9U5RqCwMpfoMq/l1mrH0JAR7y7KRvOBx0n2869aLxch+gT9GhN3yUfjiw+d/DiF1mKo14+hd62JyMmoBg==" - }, "node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "optional": true, + "peer": true, "engines": { "node": ">=0.10.0" } @@ -8529,14 +8404,6 @@ } } }, - "node_modules/warning": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", - "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", - "dependencies": { - "loose-envify": "^1.0.0" - } - }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", @@ -8610,6 +8477,8 @@ "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "optional": true, + "peer": true, "engines": { "node": ">= 6" } diff --git a/package.json b/package.json index 863b4389..d7ede534 100644 --- a/package.json +++ b/package.json @@ -14,14 +14,11 @@ "@types/react": "18.2.15", "@types/react-dom": "18.2.7", "@types/react-easy-crop": "^2.0.0", - "@types/react-image-crop": "^8.1.3", "@types/swiper": "^6.0.0", "eslint": "^8.54.0", "typescript": "5.1.6" }, "dependencies": { - "@emotion/react": "^11.11.1", - "@emotion/styled": "^11.11.0", "@hookform/resolvers": "^3.1.1", "@mui/icons-material": "^5.14.11", "@mui/material": "^5.14.11", @@ -31,23 +28,18 @@ "@radix-ui/react-scroll-area": "^1.0.5", "@radix-ui/react-select": "^2.0.0", "@radix-ui/react-toggle": "^1.0.3", + "@tanstack/react-query": "^5.17.15", "axios": "^1.4.0", - "better-react-carousel": "^1.1.1", "cookies-next": "^2.1.2", - "date-fns": "^2.30.0", "dayjs": "^1.11.10", "eslint-config-next": "13.4.12", "formik": "^2.4.2", "framer-motion": "^10.13.0", "next": "13.4.12", "react": "18.2.0", - "react-calendly": "^4.3.0", "react-dom": "18.2.0", "react-easy-crop": "^5.0.2", "react-fast-marquee": "^1.6.0", - "react-hook-form": "^7.45.2", - "react-image-crop": "^10.1.8", - "react-modal": "^3.16.1", "react-toastify": "^9.1.3", "styled-components": "^6.0.5", "swiper": "^10.0.4", diff --git a/src/components/atoms/CardSchedulingMentor/index.tsx b/src/components/atoms/CardSchedulingMentor/index.tsx index aa73bad3..c739b9f7 100644 --- a/src/components/atoms/CardSchedulingMentor/index.tsx +++ b/src/components/atoms/CardSchedulingMentor/index.tsx @@ -21,6 +21,10 @@ interface MentorsProps { export default function CardScheduling({ mentor }: MentorsProps) { const [open, setOpen] = useState(false) + const calendlyUrl = new URL( + `${mentor.calendlyName}/${mentor.agendaName}`, + 'https://calendly.com', + ).toString() function handleModal() { setOpen(!open) @@ -46,7 +50,7 @@ export default function CardScheduling({ mentor }: MentorsProps) { - + Agendar Mentoria diff --git a/src/components/atoms/GridSpecialities/index.tsx b/src/components/atoms/GridSpecialities/index.tsx index 8d98a49b..228217d8 100644 --- a/src/components/atoms/GridSpecialities/index.tsx +++ b/src/components/atoms/GridSpecialities/index.tsx @@ -14,6 +14,7 @@ import UserUpdateService from '@/services/user/userUpdateService' import useUser from '@/context/Auth/useUser' import { ToastContainer, toast } from 'react-toastify' import 'react-toastify/dist/ReactToastify.css' +import { specialties } from '@/data/static-info' interface GridSpecialitiesProps { stepNumber: (step: number) => void @@ -25,21 +26,6 @@ export default function GridSpecialities({ const { handle } = UserUpdateService() const [requestError, setError] = useState(false) - const specialities: string[] = [ - 'Carreira', - 'Liderança', - 'Produto', - 'Agilidade', - 'UX Design', - 'UI Design', - 'Front-End', - 'Back-End', - 'Mobile', - 'QA', - 'Dev Ops', - 'Dados', - ] - const [selectedSpecialities, setSelectedSpecialities] = useState([]) const [selectedCount, setSelectedCount] = useState(0) const [isComplete, setComplete] = useState(false) @@ -117,7 +103,7 @@ export default function GridSpecialities({ <>* Indica um campo obrigatório - {specialities.map((speciality, index) => ( + {specialties.map((speciality, index) => ( toggleSpeciality(speciality)} diff --git a/src/components/atoms/InputSearch/index.tsx b/src/components/atoms/InputSearch/index.tsx index ea22a2f1..c513e897 100644 --- a/src/components/atoms/InputSearch/index.tsx +++ b/src/components/atoms/InputSearch/index.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import React, { ComponentProps } from 'react' import { ContainerInput, PlaceholderInput, @@ -6,33 +6,12 @@ import { StyledSearchIcon, } from './styled' -interface InputSearchProps { - onSearch: (query: string) => void -} - -export default function InputSearch({ onSearch }: InputSearchProps) { - const [searchQuery, setSearchQuery] = useState('') - - const handleInputChange = (e: React.ChangeEvent) => { - const inputValue = e.target.value - setSearchQuery(inputValue) - - if (inputValue.length) { - onSearch(inputValue) - } else { - onSearch('') - } - } +type InputSearchProps = ComponentProps<'input'> +export default function InputSearch(props: InputSearchProps) { return ( - + Pesquise por nome diff --git a/src/components/atoms/InputSearch/styled.ts b/src/components/atoms/InputSearch/styled.ts index 1ee0b10d..3296592b 100644 --- a/src/components/atoms/InputSearch/styled.ts +++ b/src/components/atoms/InputSearch/styled.ts @@ -19,11 +19,7 @@ export const ContainerInput = styled.div` } ` -interface StyledInputSearchProps { - hasValue: boolean -} - -export const StyledInputSearch = styled.input` +export const StyledInputSearch = styled.input` border: 0; flex: 1; padding: 0.68rem; @@ -42,7 +38,7 @@ export const StyledInputSearch = styled.input` & ~ label { ${(props) => - props.hasValue && + Boolean(props.value) && css` transform: translateY(-1.5rem); padding: 0 0.25rem; diff --git a/src/components/atoms/ModalSchedMentor/index.tsx b/src/components/atoms/ModalSchedMentor/index.tsx index e4fcdc44..03053f67 100644 --- a/src/components/atoms/ModalSchedMentor/index.tsx +++ b/src/components/atoms/ModalSchedMentor/index.tsx @@ -29,6 +29,11 @@ export default function ModalSchedMentor({ mentor, onClose, }: ModalSchedProps) { + const calendlyUrl = new URL( + `${mentor.calendlyName}/${mentor.agendaName}`, + 'https://calendly.com', + ).toString() + return ( @@ -56,7 +61,7 @@ export default function ModalSchedMentor({ {mentor.aboutMe} - + Agendar mentoria diff --git a/src/components/atoms/SelectFilter/index.tsx b/src/components/atoms/SelectFilter/index.tsx index 8b18b5e2..6c56e108 100644 --- a/src/components/atoms/SelectFilter/index.tsx +++ b/src/components/atoms/SelectFilter/index.tsx @@ -1,4 +1,3 @@ -import { useState } from 'react' import ExpandMoreIcon from '@mui/icons-material/ExpandMore' import * as Select from '@radix-ui/react-select' @@ -16,17 +15,16 @@ interface SelectFilterProps extends Select.SelectProps { options: string[] selectName?: string onChange: (selectedOptions: string[]) => void + selectedOptions: string[] } export default function SelectFilter({ options, selectName, onChange, + selectedOptions, ...props }: SelectFilterProps) { - const [selectedOptions, setSelectedOptions] = useState([]) - const [open, setOpen] = useState(false) - const handleOptionChange = (option: string) => { const newSelectedOptions = [...selectedOptions] if (newSelectedOptions.includes(option)) { @@ -34,11 +32,11 @@ export default function SelectFilter({ } else { newSelectedOptions.push(option) } - setSelectedOptions(newSelectedOptions) onChange(newSelectedOptions) } + return ( - + @@ -47,7 +45,12 @@ export default function SelectFilter({ - + {options.map((option) => ( diff --git a/src/components/atoms/SelectFilter/styled.ts b/src/components/atoms/SelectFilter/styled.ts index c85554f4..6d210ef6 100644 --- a/src/components/atoms/SelectFilter/styled.ts +++ b/src/components/atoms/SelectFilter/styled.ts @@ -38,6 +38,7 @@ export const SelectTrigger = styled(Select.Trigger)` export const SelectContent = styled(Select.Content)` width: var(--radix-select-trigger-width); + max-height: var(--radix-select-content-available-height); background-color: #fff; border-bottom-left-radius: 0.5rem; border-bottom-right-radius: 0.5rem; diff --git a/src/components/atoms/Slider/index.tsx b/src/components/atoms/Slider/index.tsx index 8624d48a..75b29713 100644 --- a/src/components/atoms/Slider/index.tsx +++ b/src/components/atoms/Slider/index.tsx @@ -1,5 +1,5 @@ import { CardMentor } from '@/components/molecules/CardMentor' -import { MutableRefObject, useEffect } from 'react' +import { MutableRefObject } from 'react' import { A11y, Pagination, Scrollbar } from 'swiper/modules' import { Swiper, SwiperClass, SwiperSlide } from 'swiper/react' import { SwiperContainer } from './style' @@ -17,14 +17,11 @@ interface SliderProps { } export const Slider = ({ swiperRef }: SliderProps) => { - const { mentors, fetchMentors } = useMentorsService() + const { data: mentors } = useMentorsService() - useEffect(() => { - const handleLoadFetchMentors = async () => { - await fetchMentors() - } - handleLoadFetchMentors() - }, []) + const completedProfileMentors = mentors?.filter( + (mentor) => mentor.registerComplete, + ) return ( @@ -34,7 +31,7 @@ export const Slider = ({ swiperRef }: SliderProps) => { slidesPerView={4} ref={swiperRef} > - {mentors.map((mentor) => { + {completedProfileMentors?.map((mentor) => { return ( diff --git a/src/components/molecules/CardMentor/index.tsx b/src/components/molecules/CardMentor/index.tsx index 6183357c..f7f2f7bd 100644 --- a/src/components/molecules/CardMentor/index.tsx +++ b/src/components/molecules/CardMentor/index.tsx @@ -8,7 +8,6 @@ import { CardTitle, } from './style' import { IMentors } from '@/services/interfaces/IUseMentorsService' -import { useEffect, useState } from 'react' import userWithoutImage from '@/assets/userDefault.png' interface CardMentorProps { @@ -18,18 +17,9 @@ interface CardMentorProps { const MAX_SPECIALTIES_NUMBER = 3 export function CardMentor({ mentor }: CardMentorProps) { - const [buttonDisabled, setButtonDisabled] = useState(false) const specialties = mentor.specialties.slice(0, MAX_SPECIALTIES_NUMBER) const allSpecialtiesString = mentor.specialties.join(', ') - useEffect(() => { - if (!mentor.calendlyName || !mentor.agendaName) { - setButtonDisabled(true) - } else { - setButtonDisabled(false) - } - }, []) - return ( - + ) diff --git a/src/components/molecules/FormOnboard2/index.tsx b/src/components/molecules/FormOnboard2/index.tsx index 5d5335c8..c58fd0b3 100644 --- a/src/components/molecules/FormOnboard2/index.tsx +++ b/src/components/molecules/FormOnboard2/index.tsx @@ -19,6 +19,7 @@ import { useRouter } from 'next/router' import { ToastContainer, toast } from 'react-toastify' import 'react-toastify/dist/ReactToastify.css' import useUser from '@/context/Auth/useUser' +import { genders } from '@/data/static-info' interface FormOnBoardProps { onStep?: Dispatch> @@ -33,19 +34,6 @@ export default function FormOnboard2({ onStep }: FormOnBoardProps) { const user = useUser() const router = useRouter() - const genders = [ - 'Homem Cis', - 'Mulher Cis', - 'Homem Trans', - 'Mulher Trans', - 'Bigênero', - 'Gênero-fluido', - 'Não Binário', - 'Agênero', - 'Prefiro não dizer', - 'Outros', - ] - const { handle } = UserUpdateService() const handleError = (message: string) => { @@ -78,7 +66,7 @@ export default function FormOnboard2({ onStep }: FormOnBoardProps) { if (response) { setError(false) user.updateUser({ ...user, ...data }) - router.push('/?connect-calendly=true') + router.push('/?connect-calendly') } else { setError(true) } @@ -96,11 +84,7 @@ export default function FormOnboard2({ onStep }: FormOnBoardProps) { const closeModal = () => setIsEditModalOpen(false) useEffect(() => { - if (Object.keys(formik.touched).length > 0) { - setCompleted(true) - } else { - setCompleted(false) - } + setCompleted(Object.keys(formik.touched).length > 0) }, [formik.touched]) useEffect(() => { diff --git a/src/components/molecules/FormRegister/index.tsx b/src/components/molecules/FormRegister/index.tsx index 091c16b2..d47a013c 100644 --- a/src/components/molecules/FormRegister/index.tsx +++ b/src/components/molecules/FormRegister/index.tsx @@ -139,11 +139,9 @@ export function FormRegister() { } useEffect(() => { - if (agree && formik.isValid && Object.keys(formik.touched).length > 0) { - setIsConcluidoDesabilitado(false) - } else { - setIsConcluidoDesabilitado(true) - } + setIsConcluidoDesabilitado( + agree && formik.isValid && Object.keys(formik.touched).length > 0, + ) }, [agree, formik.isValid, formik.touched]) const yesterday = new Date() diff --git a/src/components/molecules/MentorSubHeader/index.tsx b/src/components/molecules/MentorSubHeader/index.tsx deleted file mode 100644 index 89b1c166..00000000 --- a/src/components/molecules/MentorSubHeader/index.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { useState } from 'react' -import InputSearch from '@/components/atoms/InputSearch' -import { ContainerControls, ContainerSelects, Content } from './styled' -import SelectFilter from '@/components/atoms/SelectFilter' - -interface SubHeaderProps { - onGenderChange: (selectedOptions: string[]) => void - onSpecialtyChange: (selectedOptions: string[]) => void - onMentorSearch: (query: string) => void -} - -const genderOptions = [ - 'Homem Cis', - 'Mulher cis', - 'Homem trans', - 'Mulher trans', - 'Bigenero', - 'Genero fluido', - 'Nao Binario', - 'Agenero', - 'Prefiro não dizer', - 'Outros', -] -const specialtyOptions = [ - 'Carreira', - 'Liderança', - 'Produto', - 'Agilidade', - 'UX Design', - 'UI Design', - 'Front-End', - 'Back-End', - 'Mobile', - 'QA', - 'Dev Ops', - 'Dados', -] - -export default function MentorSubHeader({ - onGenderChange, - onSpecialtyChange, - onMentorSearch, -}: SubHeaderProps) { - const [_, setMentorSearchQuery] = useState('') - - const handleMentorSearch = (query: string) => { - setMentorSearchQuery(query) - onMentorSearch(query) - } - - return ( - - - - - - - - - - ) -} diff --git a/src/components/molecules/MentorSubHeader/styled.ts b/src/components/molecules/MentorSubHeader/styled.ts deleted file mode 100644 index 6e6a6f85..00000000 --- a/src/components/molecules/MentorSubHeader/styled.ts +++ /dev/null @@ -1,22 +0,0 @@ -import styled from 'styled-components' - -export const ContainerControls = styled.div` - width: 100%; - background-color: #fff; - padding: 2rem 0; - margin-top: 50px; -` - -export const Content = styled.div` - display: flex; - justify-content: space-between; - padding: 0 2rem; - max-width: 1280px; - width: 100%; - margin: 0 auto; -` - -export const ContainerSelects = styled.div` - display: flex; - gap: 10px; -` diff --git a/src/components/organisms/DepoSection/index.tsx b/src/components/organisms/DepoSection/index.tsx index faa63b76..06dbf06d 100644 --- a/src/components/organisms/DepoSection/index.tsx +++ b/src/components/organisms/DepoSection/index.tsx @@ -3,20 +3,12 @@ import { MarqueeRolagem } from '@/components/atoms/MarqueeRolagem' import { CardDepo } from '@/components/molecules/CardDepo' import Link from 'next/link' import { ContainerBtn, ContainerDepo } from './style' -import { useEffect } from 'react' import { useTestimonyService } from '../../../services/user/useTestimonyService' +import { AxiosError } from 'axios' export function DepoSection() { - const { handleGetTestimonies, testimonies, testimoniesErrors } = - useTestimonyService() + const { data: testimonies, error } = useTestimonyService() - useEffect(() => { - const handleLoadGetTestimonies = async () => { - await handleGetTestimonies() - } - - handleLoadGetTestimonies() - }, []) return (

Seja um mentor

@@ -26,7 +18,8 @@ export function DepoSection() { testimonies?.map((testimony) => { return })} - {!testimonies?.length && {testimoniesErrors}} + + {error instanceof AxiosError && {error?.response?.data.message}} diff --git a/src/components/organisms/HeroSection/index.tsx b/src/components/organisms/HeroSection/index.tsx index 00a4ea00..2ba259b8 100644 --- a/src/components/organisms/HeroSection/index.tsx +++ b/src/components/organisms/HeroSection/index.tsx @@ -1,16 +1,23 @@ -import lupa from '@/assets/icons/Lupa.svg' -import { Button } from '@/components/atoms/Button' import { PersonTitle } from '@/components/atoms/PersonTitle' import { ListItemsHero } from '@/components/molecules/ListItemsHero' import { AnimatePresence, motion } from 'framer-motion' -import Image from 'next/image' -import { useEffect, useState } from 'react' +import { FormEvent, useEffect, useState } from 'react' import { AnimationTextHero } from '../../../styles/animations' -import { ContainerHero, ContainerInput, TextAnimated } from './style' +import { + ButtonMentor, + ContainerHero, + ContainerInputForm, + TextAnimated, +} from './style' +import Search from '@mui/icons-material/Search' +import { useRouter } from 'next/router' + +const text = ['mentorias personalizadas', 'profissionais experientes'] export function HeroSection() { - const text = ['mentorias personalizadas', 'profissionais experientes'] + const router = useRouter() const [textHero, setTextHero] = useState(text[0]) + const [queryMentor, setQueryMentor] = useState('') function textSwitch() { setTimeout(() => { @@ -26,6 +33,11 @@ export function HeroSection() { }, 1500) } + function handleSearchMentor(e: FormEvent) { + e.preventDefault() + router.push(`/mentores?q=${queryMentor}`) + } + useEffect(() => { textSwitch() // eslint-disable-next-line react-hooks/exhaustive-deps @@ -52,16 +64,21 @@ export function HeroSection() { Tenha acesso a mentorias individuais e
gratuitas com profissionais renomados.

- +
- + setQueryMentor(e.target.value)} />
-
- logo SouJunior + logo SouJunior
- Garota no pc + Garota no pc