diff --git a/.gitignore b/.gitignore index 22c6c12..2510fc5 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ # production /dist +/build # ide /.idea diff --git a/messages/de.json b/messages/de.json index 4c3ff5b..b5ac31c 100644 --- a/messages/de.json +++ b/messages/de.json @@ -30,6 +30,37 @@ }, "Messages": { "title": "Messages" + }, + "Settings": { + "title": "Profile Settings", + "photo-desc": "Add a real photo, as a person's face is always more credible.", + "name": "Name", + "surname": "Surname", + "birthday": "Date of Birth", + "email": "E-mail", + "change-password": "Change Password", + "save": "Save", + "old-password": "Old Password", + "new-password": "New Password", + "confirm-password": "Confirm Password" + }, + "LegalInformation": { + "title": "Legal Information" + }, + "Support": { + "title": "Help & Support" + }, + "Notifications": { + "title": "Notifications", + "read": "Read", + "delete": "Delete" + }, + "Sessions": { + "upcoming-sessions": "Upcoming Sessions", + "sessions-requested": "Sessions Requested", + "recent-sessions": "Recent Sessions", + "topic": "Topic", + "day-start": "Day start" } }, "Footer": { diff --git a/messages/en.json b/messages/en.json index d49cd05..a007dde 100644 --- a/messages/en.json +++ b/messages/en.json @@ -31,6 +31,37 @@ }, "Messages": { "title": "Messages" + }, + "Settings": { + "title": "Profile Settings", + "photo-desc": "Add a real photo, as a person's face is always more credible.", + "name": "Name", + "surname": "Surname", + "birthday": "Date of Birth", + "email": "E-mail", + "change-password": "Change Password", + "save": "Save", + "old-password": "Old Password", + "new-password": "New Password", + "confirm-password": "Confirm Password" + }, + "LegalInformation": { + "title": "Legal Information" + }, + "Support": { + "title": "Help & Support" + }, + "Notifications": { + "title": "Notifications", + "read": "Read", + "delete": "Delete" + }, + "Sessions": { + "upcoming-sessions": "Upcoming Sessions", + "sessions-requested": "Sessions Requested", + "recent-sessions": "Recent Sessions", + "topic": "Topic", + "day-start": "Day start" } }, "Footer": { diff --git a/messages/es.json b/messages/es.json index 4c3ff5b..b5ac31c 100644 --- a/messages/es.json +++ b/messages/es.json @@ -30,6 +30,37 @@ }, "Messages": { "title": "Messages" + }, + "Settings": { + "title": "Profile Settings", + "photo-desc": "Add a real photo, as a person's face is always more credible.", + "name": "Name", + "surname": "Surname", + "birthday": "Date of Birth", + "email": "E-mail", + "change-password": "Change Password", + "save": "Save", + "old-password": "Old Password", + "new-password": "New Password", + "confirm-password": "Confirm Password" + }, + "LegalInformation": { + "title": "Legal Information" + }, + "Support": { + "title": "Help & Support" + }, + "Notifications": { + "title": "Notifications", + "read": "Read", + "delete": "Delete" + }, + "Sessions": { + "upcoming-sessions": "Upcoming Sessions", + "sessions-requested": "Sessions Requested", + "recent-sessions": "Recent Sessions", + "topic": "Topic", + "day-start": "Day start" } }, "Footer": { diff --git a/messages/fr.json b/messages/fr.json index 4c3ff5b..b5ac31c 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -30,6 +30,37 @@ }, "Messages": { "title": "Messages" + }, + "Settings": { + "title": "Profile Settings", + "photo-desc": "Add a real photo, as a person's face is always more credible.", + "name": "Name", + "surname": "Surname", + "birthday": "Date of Birth", + "email": "E-mail", + "change-password": "Change Password", + "save": "Save", + "old-password": "Old Password", + "new-password": "New Password", + "confirm-password": "Confirm Password" + }, + "LegalInformation": { + "title": "Legal Information" + }, + "Support": { + "title": "Help & Support" + }, + "Notifications": { + "title": "Notifications", + "read": "Read", + "delete": "Delete" + }, + "Sessions": { + "upcoming-sessions": "Upcoming Sessions", + "sessions-requested": "Sessions Requested", + "recent-sessions": "Recent Sessions", + "topic": "Topic", + "day-start": "Day start" } }, "Footer": { diff --git a/messages/it.json b/messages/it.json index 4c3ff5b..b5ac31c 100644 --- a/messages/it.json +++ b/messages/it.json @@ -30,6 +30,37 @@ }, "Messages": { "title": "Messages" + }, + "Settings": { + "title": "Profile Settings", + "photo-desc": "Add a real photo, as a person's face is always more credible.", + "name": "Name", + "surname": "Surname", + "birthday": "Date of Birth", + "email": "E-mail", + "change-password": "Change Password", + "save": "Save", + "old-password": "Old Password", + "new-password": "New Password", + "confirm-password": "Confirm Password" + }, + "LegalInformation": { + "title": "Legal Information" + }, + "Support": { + "title": "Help & Support" + }, + "Notifications": { + "title": "Notifications", + "read": "Read", + "delete": "Delete" + }, + "Sessions": { + "upcoming-sessions": "Upcoming Sessions", + "sessions-requested": "Sessions Requested", + "recent-sessions": "Recent Sessions", + "topic": "Topic", + "day-start": "Day start" } }, "Footer": { diff --git a/messages/ru.json b/messages/ru.json index 6cde3f8..b3bca11 100644 --- a/messages/ru.json +++ b/messages/ru.json @@ -23,13 +23,44 @@ "work-with-us": "Работать с нами" }, "WorkWithUs": { - "title": "Become a BBuddy Expert", + "title": "Стань BBuddy экспертом", "insert-info": "Insert your personal information to start your journey as a BBuddy Expert", - "start": "Get Started", + "start": "Начать", "base-text": "Your info can either be added or amended at anytime" }, "Messages": { "title": "Сообщения" + }, + "Settings": { + "title": "Настройки пользователя", + "photo-desc": "Добавьте реальное фото, это вызывает больше доверия", + "name": "Имя", + "surname": "Фамилия", + "birthday": "Дата рождения", + "email": "E-mail", + "change-password": "Изменить пароль", + "save": "Сохранить изменения", + "old-password": "Старый пароль", + "new-password": "Новый пароль", + "confirm-password": "Подтверждение пароля" + }, + "LegalInformation": { + "title": "Legal Information" + }, + "Support": { + "title": "Помощь и поддержка" + }, + "Notifications": { + "title": "Оповещения", + "read": "Смотреть", + "delete": "Удалить" + }, + "Sessions": { + "upcoming-sessions": "Upcoming Sessions", + "sessions-requested": "Sessions Requested", + "recent-sessions": "Recent Sessions", + "topic": "Тема", + "day-start": "Дата начала" } }, "Footer": { diff --git a/next.config.js b/next.config.js index 94984d6..9ff142f 100644 --- a/next.config.js +++ b/next.config.js @@ -14,9 +14,27 @@ const nextConfig = { sassOptions: { includePaths: [path.join(__dirname, 'styles')], }, + images: { + unoptimized: true + }, + experimental: { + taint: true, + typedRoutes: true + }, output: 'export', - cleanDistDir: true, - distDir: 'dist' + distDir: 'dist', + poweredByHeader: false, + productionBrowserSourceMaps: true, + trailingSlash: true + // redirects: async () => { + // return [ + // { + // source: '/en/', + // destination: '/en.html', + // permanent: true + // } + // ] + // } }; module.exports = withNextIntl(nextConfig); diff --git a/package-lock.json b/package-lock.json index ef7e586..238a69c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@ant-design/cssinjs": "^1.18.1", "@ant-design/icons": "^5.2.6", "antd": "^5.12.1", + "axios": "^1.6.5", "next": "14.0.3", "next-intl": "^3.3.1", "react": "^18", @@ -1123,6 +1124,11 @@ "has-symbols": "^1.0.3" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "node_modules/autoprefixer": { "version": "10.4.16", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz", @@ -1181,6 +1187,16 @@ "node": ">=4" } }, + "node_modules/axios": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", + "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "dependencies": { + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/axobject-query": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", @@ -1403,6 +1419,17 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/compute-scroll-into-view": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz", @@ -1524,6 +1551,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -2243,6 +2278,25 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, + "node_modules/follow-redirects": { + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -2252,6 +2306,19 @@ "is-callable": "^1.1.3" } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fraction.js": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", @@ -3180,6 +3247,25 @@ "node": ">=8.6" } }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3624,6 +3710,11 @@ "react-is": "^16.13.1" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -5938,6 +6029,11 @@ "has-symbols": "^1.0.3" } }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "autoprefixer": { "version": "10.4.16", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz", @@ -5964,6 +6060,16 @@ "integrity": "sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==", "dev": true }, + "axios": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", + "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "requires": { + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "axobject-query": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", @@ -6113,6 +6219,14 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, "compute-scroll-into-view": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz", @@ -6211,6 +6325,11 @@ "object-keys": "^1.1.1" } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, "dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -6776,6 +6895,11 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, + "follow-redirects": { + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==" + }, "for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -6785,6 +6909,16 @@ "is-callable": "^1.1.3" } }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fraction.js": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", @@ -7458,6 +7592,19 @@ "picomatch": "^2.3.1" } }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -7754,6 +7901,11 @@ "react-is": "^16.13.1" } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", diff --git a/package.json b/package.json index 3e7a80e..df52fec 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "dev": "next dev", + "dev": "next dev -p 4200", "build": "next build", "start": "next start", "lint": "next lint" @@ -12,6 +12,7 @@ "@ant-design/cssinjs": "^1.18.1", "@ant-design/icons": "^5.2.6", "antd": "^5.12.1", + "axios": "^1.6.5", "next": "14.0.3", "next-intl": "^3.3.1", "react": "^18", diff --git a/public/images/apple-logo.png b/public/images/apple-logo.png new file mode 100644 index 0000000..33e5f55 Binary files /dev/null and b/public/images/apple-logo.png differ diff --git a/public/images/facebook-logo.png b/public/images/facebook-logo.png new file mode 100644 index 0000000..d85d178 Binary files /dev/null and b/public/images/facebook-logo.png differ diff --git a/public/images/google-logo.png b/public/images/google-logo.png new file mode 100644 index 0000000..d27c2af Binary files /dev/null and b/public/images/google-logo.png differ diff --git a/public/images/logo-auth.svg b/public/images/logo-auth.svg new file mode 100644 index 0000000..8b43fbd --- /dev/null +++ b/public/images/logo-auth.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/images/popular.png b/public/images/popular1.png similarity index 100% rename from public/images/popular.png rename to public/images/popular1.png diff --git a/public/images/popular2.png b/public/images/popular2.png new file mode 100644 index 0000000..227132b Binary files /dev/null and b/public/images/popular2.png differ diff --git a/public/images/popular3.png b/public/images/popular3.png new file mode 100644 index 0000000..983470c Binary files /dev/null and b/public/images/popular3.png differ diff --git a/public/images/popular4.png b/public/images/popular4.png new file mode 100644 index 0000000..b077958 Binary files /dev/null and b/public/images/popular4.png differ diff --git a/public/images/popular5.png b/public/images/popular5.png new file mode 100644 index 0000000..e1d5e18 Binary files /dev/null and b/public/images/popular5.png differ diff --git a/public/images/popular6.png b/public/images/popular6.png new file mode 100644 index 0000000..329ee09 Binary files /dev/null and b/public/images/popular6.png differ diff --git a/src/actions/auth.ts b/src/actions/auth.ts new file mode 100644 index 0000000..19cb9ac --- /dev/null +++ b/src/actions/auth.ts @@ -0,0 +1,14 @@ +import { AxiosResponse } from 'axios'; +import { apiClient } from '../lib/apiClient'; + +export const getAuth = (login: string, password: string, locale: string ): Promise> => ( + apiClient.post( + '/auth/login', + { login, password }, + { + headers: { + 'X-User-Language': locale + } + } + ) +); diff --git a/src/actions/experts.ts b/src/actions/experts.ts new file mode 100644 index 0000000..7ac8d57 --- /dev/null +++ b/src/actions/experts.ts @@ -0,0 +1,32 @@ +import { apiClient } from '../lib/apiClient'; +import { Filter, ExpertsData, ExpertDetails } from '../types/experts'; + +export const getExpertsList = async (filter: Filter, locale: string) => { + const response = await apiClient.post( + '/home/coachsearch', + { ...filter }, + { + headers: { + 'X-User-Language': locale, + Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImN0eSI6IkpXVCJ9.eyJuYW1laWQiOiIxNzIiLCJuYmYiOjE3MDM2ODMyMDgsImV4cCI6MTczNTIxOTIwOCwiaWF0IjoxNzAzNjgzMjA4fQ.KgnYfKO7oVFLlDuKhfyNN6RAaXKdeSzJd7F4r6_15AA' + } + } + ); + + return response.data?.coaches as ExpertsData || null; +}; + +export const getExpertById = async (id: string, locale: string) => { + const response = await apiClient.post( + '/home/coachdetails', + { id }, + { + headers: { + 'X-User-Language': locale, + Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImN0eSI6IkpXVCJ9.eyJuYW1laWQiOiIxNzIiLCJuYmYiOjE3MDM2ODMyMDgsImV4cCI6MTczNTIxOTIwOCwiaWF0IjoxNzAzNjgzMjA4fQ.KgnYfKO7oVFLlDuKhfyNN6RAaXKdeSzJd7F4r6_15AA' + } + } + ); + + return response.data as ExpertDetails || null; +}; diff --git a/src/app/[locale]/(main)/@directions/page.tsx b/src/app/[locale]/(main)/@directions/page.tsx index 2a20d96..3aa0deb 100644 --- a/src/app/[locale]/(main)/@directions/page.tsx +++ b/src/app/[locale]/(main)/@directions/page.tsx @@ -9,7 +9,7 @@ export default function Directions() {
- +
Work Life Balance
@@ -23,10 +23,10 @@ export default function Directions() {
- +
-
Work Life Balance
+
Strategic Session
23 experts | 245 offers @@ -37,10 +37,10 @@ export default function Directions() {
- +
-
Work Life Balance
+
Personal Growth
23 experts | 245 offers @@ -51,10 +51,10 @@ export default function Directions() {
- +
-
Work Life Balance
+
Career Planning
23 experts | 245 offers @@ -65,10 +65,10 @@ export default function Directions() {
- +
-
Work Life Balance
+
Executive Coaching
23 experts | 245 offers @@ -79,10 +79,10 @@ export default function Directions() {
- +
-
Work Life Balance
+
Career Development
23 experts | 245 offers diff --git a/src/app/[locale]/(main)/@experts/page.tsx b/src/app/[locale]/(main)/@experts/page.tsx index 4895e29..d17297d 100644 --- a/src/app/[locale]/(main)/@experts/page.tsx +++ b/src/app/[locale]/(main)/@experts/page.tsx @@ -1,76 +1,20 @@ -'use client'; - import React from 'react'; -import { Avatar, List, Typography, Tag } from 'antd'; -import { RightOutlined } from '@ant-design/icons'; -import { Link } from '../../../../navigation'; -import { ExpertsFilter, ExpertsAdditionalFilter } from '../../../../components/Experts'; +import { CustomPagination } from '../../../../components/view'; +import { ExpertsFilter } from '../../../../components/Experts/Filter'; +import { ExpertsAdditionalFilter } from '../../../../components/Experts/AdditionalFilter'; +import { ExpertsList } from '../../../../components/Experts/ExpertsList'; +import { getExpertsList } from '../../../../actions/experts'; -const { Text } = Typography; - -const data = Array.from({ length: 10 }).map((_, i) => ({ - href: '/', - name: 'Matthew Weeks', - avatar: '/images/person.png', - duration: '45min', - price: '45$', - skills: ['Engineering & Data', 'Soft skills', 'Interview'], - speciality: 'Senior Software Engineer', - specialityDesc: 'Auth0', - description: 'I have worked across a variety of organizations, lead teams, and delivered quality software for 8 years. In that time I\'ve worked as an independent consultant, at agencies as a team lead, and as a senior engineer at Auth0. I also host a podcast https://anchor.fm/work-in-programming where I break down how …' -})); - -export default function Experts() { - const expertsList = ( - { - console.log(page); - }, - pageSize: 5 - }} - dataSource={data} - renderItem={(item) => ( - - } - title={item.name} - description={( -
- {item.price} / {item.duration} -
- )} - /> -
-
- {item.skills.map((skill) => {skill})} -
Engineering & Data
-
+6
-
-
-
{item.speciality}
-
{item.specialityDesc}
-
{item.description}
-
- - , - onCopy: undefined, - tooltips: false - }} - > - Details - - -
-
- )} - /> - ); +export default async function Experts({ params }: { params: { locale: string } }) { + const data = await getExpertsList({ + "themesTagIds": [ + 1,2,3,4,5,6,7,8 + ], + "priceFrom": null, + "priceTo": null, + "durationFrom": null, + "durationTo": null + }, params.locale); return (
@@ -83,54 +27,12 @@ export default function Experts() {
- +
-
-
-
-
- -
-
-
Matthew Weeks
-
- 45$ / 45min -
-
-
-
-
-
Engineering & Data
-
Engineering & Data
-
+6
-
-
-
Senior Software Engineer
-
Auth0
-
- I have worked across a variety of organizations, lead teams, and delivered quality - software for 8 years. In that time I've worked as an independent consultant, at - agencies as a team lead, and as a senior engineer at Auth0. I also host a podcast - https://anchor.fm/work-in-programming where I break down how … -
- -
- {expertsList} -
-
    -
  • 1
  • -
  • - 2 -
  • -
  • 3
  • -
  • 4
  • -
+ +
diff --git a/src/app/[locale]/(main)/layout.tsx b/src/app/[locale]/(main)/layout.tsx index 5d60658..daa1e7d 100644 --- a/src/app/[locale]/(main)/layout.tsx +++ b/src/app/[locale]/(main)/layout.tsx @@ -1,16 +1,16 @@ import React, { ReactNode } from 'react'; -import { getTranslations } from 'next-intl/server'; - -export async function generateMetadata({ - params: { locale } -}: { params: { locale: string }}) { - const t = await getTranslations({ locale, namespace: 'Main' }); - - return { - title: t('title'), - description: t('description'), - }; -} +// import { getTranslations } from 'next-intl/server'; +// +// export async function generateMetadata({ +// params: { locale } +// }: { params: { locale: string }}) { +// const t = await getTranslations({ locale, namespace: 'Main' }); +// +// return { +// title: t('title'), +// description: t('description'), +// }; +// } export default function MainLayout({ children, news, directions, experts }: { children: ReactNode, diff --git a/src/app/[locale]/(main)/page.tsx b/src/app/[locale]/(main)/page.tsx index 0801717..98b0131 100644 --- a/src/app/[locale]/(main)/page.tsx +++ b/src/app/[locale]/(main)/page.tsx @@ -19,12 +19,20 @@ export default function Home() {

from a mentor, and getting your feet wet with coaching.

- + AppStore - + GooglePlay diff --git a/src/app/[locale]/[userId]/information/page.tsx b/src/app/[locale]/[userId]/information/page.tsx index 39b8dfa..d21f33e 100644 --- a/src/app/[locale]/[userId]/information/page.tsx +++ b/src/app/[locale]/[userId]/information/page.tsx @@ -1,5 +1,6 @@ import React from 'react'; import type { Metadata } from 'next'; +import { useTranslations } from 'next-intl'; export const metadata: Metadata = { title: 'Bbuddy - Account - Information', @@ -7,9 +8,68 @@ export const metadata: Metadata = { }; export default function Information() { + const t = useTranslations('Account.LegalInformation'); + return ( -
- Страница Информации о пользователе -
+ <> +
    +
  1. {t('title')}
  2. +
+
+ Welcome to the B BUDDY LTD’s privacy policy.
+ B BUDDY LTD respects your privacy and is committed to protecting your personal data. This privacy policy + will inform you as to how we collect, use and look after your personal data. It further describes your + privacy rights and the control you can exercise in relation to your personal data. +
+

+ Important Information +

+
+ This privacy policy is issued on behalf of B BUDDY LTD which is the controller of your personal data. B + BUDDY LTD is a limited liability company registered in the Republic of Cyprus with registration number + HE 417576. +
+ This privacy policy is addressed to individuals outside B BUDDY LTD with whom we interact, including + individual clients, representatives, directors, shareholders, beneficial owners, coaches and/or + mentors and/or consultants of our application and/or website as well as other users of our services + and suppliers. +
+

What Personal Date We Collect About You?

+
+ We may collect, use, store and transfer different kinds of personal data about you which we have grouped + together as follows:
+ Identity Data includes first name, maiden name, last name, username or similar identifier, title, + date of birth, gender;
+ Contact Data includes billing address, delivery address, email address, and telephone numbers + (including mobile telephone number(s)), postal address.
+ Business Data includes date identifying you in relation to matters on which you instruct us or + in which you are involved such as diplomas and any other educational document or + certificate;
+ Consent Records Data includes records of any consents you have given us, together with the date, + means of consent and any other information provided such as the subject matter of the consent + provided;
+ Supplier Data includes contact details and other information about you or your company or + organisation where you provide services to B BUDDY LTD;
+ Tracker (i.e. any technology - e.g Cookies, unique identifiers, web beacons, embedded scripts, + e-tags and fingerprinting - that enables the tracking of Users, for example by accessing or + storing information on the User’s device);
+ Usage Data (i.e information collected automatically through this Website (or third-party + services employed in this Website), which can include: the IP addresses or domain names of the + computers utilized by the Users who use this Website, the URI addresses (Uniform Resource + Identifier), the time of the request, the method utilized to submit the request to the server, + the size of the file received in response, the numerical code indicating the status of the + server's answer (successful outcome, error, etc.), the country of origin, the features of the + browser and the operating system utilized by the User, the various time details per visit (e.g., + the time spent on each page within the Application) and the details about the path followed + within the Application with special reference to the sequence of pages visited, and other + parameters about the device operating system and/or the User's IT environment.);
+ Any other information relating to you which you may provide us with, such as health personal + data, if required by us to be able to provide our services to you.
+ B BUDDY LTD does not collect any payment details data as they are collected directly by Stripe, + Inc. which is responsible to effect the payments. Stripe, Inc. is a PCI Service Provider Level 1 + and it is obliged to follow PCI compliance and the General Data Protection Regulations 2018 + (GDPR). +
+ ); -} +}; diff --git a/src/app/[locale]/[userId]/notifications/page.tsx b/src/app/[locale]/[userId]/notifications/page.tsx index 39b8dfa..006a9d8 100644 --- a/src/app/[locale]/[userId]/notifications/page.tsx +++ b/src/app/[locale]/[userId]/notifications/page.tsx @@ -1,15 +1,55 @@ import React from 'react'; import type { Metadata } from 'next'; +import { useTranslations } from 'next-intl'; export const metadata: Metadata = { - title: 'Bbuddy - Account - Information', - description: 'Bbuddy desc information' + title: 'Bbuddy - Account - Notifications', + description: 'Bbuddy desc notifications' }; -export default function Information() { +export default function Notifications() { + const t = useTranslations('Account.Notifications'); + return ( -
- Страница Информации о пользователе -
+ <> +
    +
  1. {t('title')}
  2. +
+
+ +
+
Notification Headline
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc auctor leo eu justo molestie +
+
25 may 2022
+ +
+
+
Notification Headline
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc auctor leo eu justo molestie +
+
25 may 2022
+ +
+
+ ); } diff --git a/src/app/[locale]/[userId]/sessions/page.tsx b/src/app/[locale]/[userId]/sessions/page.tsx index 6c58f96..347461f 100644 --- a/src/app/[locale]/[userId]/sessions/page.tsx +++ b/src/app/[locale]/[userId]/sessions/page.tsx @@ -1,15 +1,25 @@ import React from 'react'; import type { Metadata } from 'next'; +import { useTranslations } from 'next-intl'; +import { SessionsTabs } from '../../../../components/Account'; export const metadata: Metadata = { - title: 'Bbuddy - Account - Information', - description: 'Bbuddy desc information' + title: 'Bbuddy - Account - Sessions', + description: 'Bbuddy desc sessions' }; export default function Sessions() { + const t = useTranslations('Account.Sessions'); + return ( -
- Страница Информации о пользователе -
+ ); } diff --git a/src/app/[locale]/[userId]/settings/change-password/page.tsx b/src/app/[locale]/[userId]/settings/change-password/page.tsx new file mode 100644 index 0000000..e9c72a3 --- /dev/null +++ b/src/app/[locale]/[userId]/settings/change-password/page.tsx @@ -0,0 +1,32 @@ +import React from 'react'; +import { useTranslations } from 'next-intl'; +import { Link } from '../../../../../navigation'; + +export default function ChangePassword({ params }: { params: { userId: string } }) { + const t = useTranslations('Account.Settings'); + + return ( + <> +
    +
  1. + + {t('title')} + +
  2. +
  3. {t('change-password')}
  4. +
+
+
+ +
+
+ +
+
+ +
+ +
+ + ); +}; diff --git a/src/app/[locale]/[userId]/settings/page.tsx b/src/app/[locale]/[userId]/settings/page.tsx index 39b8dfa..8f0c246 100644 --- a/src/app/[locale]/[userId]/settings/page.tsx +++ b/src/app/[locale]/[userId]/settings/page.tsx @@ -1,15 +1,48 @@ import React from 'react'; import type { Metadata } from 'next'; +import { useTranslations } from 'next-intl'; +import {Link} from "../../../../navigation"; export const metadata: Metadata = { - title: 'Bbuddy - Account - Information', - description: 'Bbuddy desc information' + title: 'Bbuddy - Account - Profile Settings', + description: 'Bbuddy desc Profile settings' }; -export default function Information() { +export default function Settings({ params }: { params: { userId: string } }) { + const t = useTranslations('Account.Settings'); + return ( -
- Страница Информации о пользователе -
+ <> +
    +
  1. {t('title')}
  2. +
+
+
+
+ +
+
{t('photo-desc')}
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + {t('change-password')} + +
+ +
+ ); -} +}; diff --git a/src/app/[locale]/[userId]/support/page.tsx b/src/app/[locale]/[userId]/support/page.tsx index 39b8dfa..36ab43a 100644 --- a/src/app/[locale]/[userId]/support/page.tsx +++ b/src/app/[locale]/[userId]/support/page.tsx @@ -1,15 +1,23 @@ import React from 'react'; import type { Metadata } from 'next'; +import {useTranslations} from "next-intl"; export const metadata: Metadata = { - title: 'Bbuddy - Account - Information', - description: 'Bbuddy desc information' + title: 'Bbuddy - Account - Help & Support', + description: 'Bbuddy desc help & support' }; -export default function Information() { +export default function Support() { + const t = useTranslations('Account.Support'); + return ( -
- Страница Информации о пользователе -
+ <> +
    +
  1. {t('title')}
  2. +
+
+ some text +
+ ); } diff --git a/src/app/[locale]/[userId]/work-with-us/page.tsx b/src/app/[locale]/[userId]/work-with-us/page.tsx index 5fc8191..1694003 100644 --- a/src/app/[locale]/[userId]/work-with-us/page.tsx +++ b/src/app/[locale]/[userId]/work-with-us/page.tsx @@ -15,7 +15,6 @@ export default function WorkWithUs() {
  1. {t('title')}
-
diff --git a/src/app/[locale]/experts/[expertId]/page.tsx b/src/app/[locale]/experts/[expertId]/page.tsx index ca5bb14..57c1195 100644 --- a/src/app/[locale]/experts/[expertId]/page.tsx +++ b/src/app/[locale]/experts/[expertId]/page.tsx @@ -2,18 +2,79 @@ import React from 'react'; import type { Metadata } from 'next'; import { notFound } from 'next/navigation'; import { Link } from '../../../../navigation'; +import { getExpertById, getExpertsList } from '../../../../actions/experts'; +import { + ExpertCard, + ExpertCertificate, + ExpertInformation, + ExpertPractice +} from '../../../../components/Experts/ExpertDetails'; +import { Details } from '../../../../types/experts'; export const metadata: Metadata = { title: 'Bbuddy - Experts item', description: 'Bbuddy desc experts' }; -export function generateStaticParams() { - return [{ expertId: '1' }, { expertId: '2' }]; +export async function generateStaticParams({ + params: { locale }, +}: { params: { locale: string } }) { + const result: { locale: string, expertId: string }[] = []; + const experts = await getExpertsList({ + "themesTagIds": [ + 1,2,3,4,5,6,7,8 + ], + "priceFrom": null, + "priceTo": null, + "durationFrom": null, + "durationTo": null + }, locale); + + experts?.forEach(({ id }) => { + result.push({ locale, expertId: id.toString() }); + }); + + return result; } -export default function ExpertItem({ params }: { params: { expertId: string } }) { - if (!params?.expertId) notFound(); +export default async function ExpertItem({ params: { expertId = '', locale} }: { params: { expertId: string, locale: string } }) { + if (!expertId) notFound(); + + const expert = await getExpertById(expertId, locale); + + const getAssociationLevel = (accLevelId?: number) => { + if (accLevelId) { + const [cur] = (expert?.associationLevels || []).filter(({ id }) => id === accLevelId) || []; + + return cur?.name || ''; + } + + return ''; + }; + + const getAssociation = (accLevelId?: number) => { + if (accLevelId) { + const [curLevel] = (expert?.associationLevels || []).filter(({ id }) => id === accLevelId) || []; + if (curLevel) { + const [cur] = (expert?.associations || []).filter(({ id }) => id === curLevel.associationId) || []; + return cur?.name || ''; + } + } + + return ''; + }; + + const generateDescription = ({ id, title, description, document }: Details) => ( +
+

{title}

+

{description}

+ {document && ( +
+ +
+ )} +
+ ); return (
@@ -24,125 +85,37 @@ export default function ExpertItem({ params }: { params: { expertId: string } }) Back to experts list
-
-
-
- -
-
-

{`Matthew Weeks | id ${params.expertId}`}

-
- 12 Practice hours - | - 15 Supervision per year -
-
- - 4/5 (out of 345) -
-
-
- -
-

Current Offer

-
-
Engineering & Data
-
Communication
-
Communication
-
-

- Hello, my name is Marcelo. I am a Senior UX Designer with more than 6 years of experience working - with the largest companies in the world such as Disney, Globant and currently IBM. - During my career, I have helped organizations solve complex problems using aesthetically pleasing - designs with design while building teams and mentoring other designers. - I can help you:
- Prepare for interviews, prepare your resume or CV and work on your LinkedIn profile
- Get ready for whiteboard challenges and take-home exercises
- Create a great portfolio and case study presentation.
- Provide industry information.
- Professional orientation
- Strategic thinking

+ + - Oh, and I also speak Spanish! -

-
- - Sign Up Now - -
- 45$ / 45min -
-

Expert Background

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra malesuada, ligula sem tempor risus, non posuere urna diam a libero.

-

Education

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. -

-
- -
-

Professional Certification

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. -

-

Trainings | Seminars | Courses

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. -

-

MBA Information

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. -

-

Managerial Experience

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. -

-

Entrepreneurial Experience

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. -

-

Successful Cases From Practice

-
-
-
Engineering & Data
-
Communication
-
Communication
+ {expert?.publicCoachDetails?.educations && expert.publicCoachDetails.educations?.map(generateDescription)} + {expert?.publicCoachDetails?.certificates && expert.publicCoachDetails.certificates.length > 0 && ( +
+

Professional Certification

+ {expert.publicCoachDetails.certificates?.map((cert) => ( +
+

+ {`${getAssociationLevel(cert?.associationLevelId)} ${getAssociation(cert?.associationLevelId)}`} +

+ {cert.document && ( +
+ +
+ )} +
+ ))}
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. -

-
-
-
-
Engineering & Data
-
Communication
-
Communication
-
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. -

-
+ )} + {expert?.publicCoachDetails?.trainings && expert.publicCoachDetails.trainings?.map(generateDescription)} + {expert?.publicCoachDetails?.mbas && expert.publicCoachDetails.mbas?.map(generateDescription)} + {expert?.publicCoachDetails?.experiences && expert.publicCoachDetails.experiences?.map(generateDescription)} + +

All Offers by this Expert

diff --git a/src/app/[locale]/experts/page.tsx b/src/app/[locale]/experts/page.tsx index d1c2faa..ea273ab 100644 --- a/src/app/[locale]/experts/page.tsx +++ b/src/app/[locale]/experts/page.tsx @@ -1,14 +1,27 @@ import React from 'react'; import type { Metadata } from 'next'; -import { ExpertsFilter, ExpertsAdditionalFilter } from '../../../components/Experts'; +import { getExpertsList } from '../../../actions/experts'; +import { ExpertsFilter } from '../../../components/Experts/Filter'; +import { ExpertsAdditionalFilter } from '../../../components/Experts/AdditionalFilter'; +import { ExpertsList } from '../../../components/Experts/ExpertsList'; +import { CustomPagination } from '../../../components/view'; export const metadata: Metadata = { title: 'Bbuddy - Experts', description: 'Bbuddy desc experts' }; -export default function Experts({ searchParams }: { searchParams: { [key: string]: string | string[] | undefined } }) { +export default async function Experts({ params, searchParams }: { params: { locale: string }, searchParams: { [key: string]: string | string[] | undefined } }) { console.log('search params', searchParams); + const data = await getExpertsList({ + "themesTagIds": [ + 1,2,3,4,5,6,7,8 + ], + "priceFrom": null, + "priceTo": null, + "durationFrom": null, + "durationTo": null + }, params.locale); return (
@@ -17,162 +30,17 @@ export default function Experts({ searchParams }: { searchParams: { [key: string

Find a expert

- +
- +
-
-
-
-
- -
-
-
Matthew Weeks
-
- 45$ / 45min -
-
-
-
-
-
Engineering & Data
-
Engineering & Data
-
+6
-
-
-
Senior Software Engineer
-
Auth0
-
- I have worked across a variety of organizations, lead teams, and delivered - quality software for 8 years. In that time I've worked as an independent - consultant, at agencies as a team lead, and as a senior engineer at Auth0. I - also host a podcast https://anchor.fm/work-in-programming where I break down how - … -
- -
-
-
-
- -
-
-
Matthew Weeks
-
- 45$ / 45min -
-
-
-
-
-
Engineering & Data
-
Engineering & Data
-
+6
-
-
-
Senior Software Engineer
-
Auth0
-
- I have worked across a variety of organizations, lead teams, and delivered - quality software for 8 years. In that time I've worked as an independent - consultant, at agencies as a team lead, and as a senior engineer at Auth0. I - also host a podcast https://anchor.fm/work-in-programming where I break down how - … -
- -
-
-
-
- -
-
-
Matthew Weeks
-
- 45$ / 45min -
-
-
-
-
-
Engineering & Data
-
Engineering & Data
-
+6
-
-
-
Senior Software Engineer
-
Auth0
-
- I have worked across a variety of organizations, lead teams, and delivered - quality software for 8 years. In that time I've worked as an independent - consultant, at agencies as a team lead, and as a senior engineer at Auth0. I - also host a podcast https://anchor.fm/work-in-programming where I break down how - … -
- -
-
-
-
- -
-
-
Matthew Weeks
-
- 45$ / 45min -
-
-
-
-
-
Engineering & Data
-
Engineering & Data
-
+6
-
-
-
Senior Software Engineer
-
Auth0
-
- I have worked across a variety of organizations, lead teams, and delivered - quality software for 8 years. In that time I've worked as an independent - consultant, at agencies as a team lead, and as a senior engineer at Auth0. I - also host a podcast https://anchor.fm/work-in-programming where I break down how - … -
- -
-
- -
    -
  • 1
  • -
  • - 2 -
  • -
  • 3
  • -
  • 4
  • -
+ +
diff --git a/src/components/Account/SessionsTabs.tsx b/src/components/Account/SessionsTabs.tsx new file mode 100644 index 0000000..05906f4 --- /dev/null +++ b/src/components/Account/SessionsTabs.tsx @@ -0,0 +1,110 @@ +'use client'; + +import React from 'react'; +import { Tabs } from 'antd'; + +export const SessionsTabs = ({ intlConfig }: { intlConfig: Record }) => { + const getChildren = () => ( + <> +
+
+ +
+ +
+
+
+
+
+ +
+
+
Matthew Weeks
+
+ Personal Growth Course +
+
+ Today 10:00 AM - 10:30 AM +
+
+
+
+
+
+
+ +
+
+
Matthew Weeks
+
+ Personal Growth Course +
+
+ 8 december at 10:00 AM - 10:30 AM +
+
+
+
+
+
+
+ +
+
+
Matthew Weeks
+
+ Personal Growth Course +
+
+ 8 december at 10:00 AM - 10:30 AM +
+
+
+
+
+ + ); + + const tabs = [ + { + key: 'upcoming', + label: ( +
+ {intlConfig?.upcoming || 'Tab 1'} + 3 +
+ ), + children: getChildren() + }, + { + key: 'requested', + label: ( +
+ {intlConfig?.requested || 'Tab 2'} + 2 +
+ ), + children: getChildren() + }, + { + key: 'recent', + label: ( +
+ {intlConfig?.recent || 'Tab 3'} +
+ ), + children: getChildren() + } + ]; + + return ( + ()} + /> + ); +}; diff --git a/src/components/Account/index.ts b/src/components/Account/index.ts index 54502a1..9f820ac 100644 --- a/src/components/Account/index.ts +++ b/src/components/Account/index.ts @@ -1 +1,2 @@ export { AccountMenu } from './AccountMenu'; +export { SessionsTabs } from './SessionsTabs'; diff --git a/src/components/Experts/AdditionalFilter.tsx b/src/components/Experts/AdditionalFilter.tsx index fc15404..18eb916 100644 --- a/src/components/Experts/AdditionalFilter.tsx +++ b/src/components/Experts/AdditionalFilter.tsx @@ -1,10 +1,11 @@ 'use client'; import React, { useCallback, useState } from 'react'; -import { Input, Select } from 'antd'; +import { Select } from 'antd'; import { AdditionalFilter } from '../../types/experts'; import { INITIAL_ADD_FILTER } from '../../constants/experts'; import { LOCALES } from '../../constants/locale'; +import { CustomInput } from '../view'; export const ExpertsAdditionalFilter = () => { const [filter, setFilter] = useState(INITIAL_ADD_FILTER); @@ -19,15 +20,20 @@ export const ExpertsAdditionalFilter = () => { return (
- + onChangeFilter('text', e?.target?.value)} + />
- onChangeFilter('text', e?.target?.value)}/>
+); diff --git a/src/components/view/CustomMultiSelect.tsx b/src/components/view/CustomMultiSelect.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/components/view/CustomPagination.tsx b/src/components/view/CustomPagination.tsx new file mode 100644 index 0000000..0f807af --- /dev/null +++ b/src/components/view/CustomPagination.tsx @@ -0,0 +1,58 @@ +'use client'; + +import React from 'react'; +import styled from 'styled-components'; +import { Pagination as AntdPagination, PaginationProps } from 'antd'; + +const DEFAULT_SIZE = 5; + +const Pagination = styled(AntdPagination)` + display: flex; + gap: 8px; + + .ant-pagination-item { + margin-inline-end: 0 !important; + height: 40px !important; + width: 40px !important; + border-radius: 8px !important; + line-height: 38px !important; + font-family: var(--font-inter) !important; + font-weight: 400 !important; + border-color: #2c7873 !important; + font-size: 16px !important; + + a { + color: #2c7873 !important; + } + } + + .ant-pagination-item-active { + background: #2c7873 !important; + + a { + color: #fff !important; + } + } + + .ant-pagination-item:not(.ant-pagination-item-active):active, + .ant-pagination-item:not(.ant-pagination-item-active):hover { + background-color: rgba(44, 120, 115, 0.06) !important; + } +`; + +const itemRender: PaginationProps['itemRender'] = (_, type, originalElement) => { + if (type === 'prev' || type === 'next') { + return null; + } + + return originalElement; +}; + +export const CustomPagination = (props: PaginationProps) => ( + +); diff --git a/src/components/view/CustomRate.tsx b/src/components/view/CustomRate.tsx new file mode 100644 index 0000000..0c5f89c --- /dev/null +++ b/src/components/view/CustomRate.tsx @@ -0,0 +1,25 @@ +import React from 'react'; +import styled from 'styled-components'; +import { Rate as AntdRate } from 'antd'; + +const Rate = styled(AntdRate)` + display: inline-flex !important; + gap: 4px; + + li { + margin-inline-end: 0 !important; + padding: 5px 0 0 !important; + + &.ant-rate-star-full span { + color: #ffbd00 !important; + } + + &.ant-rate-star-zero span { + color: #c4dfe6 !important; + } + } +`; + +export const CustomRate = (props: any) => ( + +); diff --git a/src/components/view/CustomSelect.tsx b/src/components/view/CustomSelect.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/components/view/CustomSlider.tsx b/src/components/view/CustomSlider.tsx new file mode 100644 index 0000000..a9eacbc --- /dev/null +++ b/src/components/view/CustomSlider.tsx @@ -0,0 +1,49 @@ +'use client'; + +import React from 'react'; +import styled from 'styled-components'; +import { Slider as AntdSlider } from 'antd'; + +const Slider = styled(AntdSlider)` + padding-block: 7px !important; + height: 16px !important; + + .ant-slider-rail { + background-color: #E5E5E5 !important; + } + + .ant-slider-track { + background-color: #66A5AD !important; + } + + .ant-slider-handle { + width: 16px !important; + height: 16px !important; + + &::before { + width: 16px !important; + height: 16px !important; + inset-inline-start: 0 !important; + inset-block-start: 0 !important; + } + + &::after { + width: 16px !important; + height: 16px !important; + background-color: #66A5AD !important; + inset-inline-start: 0 !important; + inset-block-start: 0 !important; + box-shadow: none !important; + } + + &:focus, &:hover { + &::after { + box-shadow: 0 0 0 10px rgba(102, 165, 173, .2) !important; + } + } + } +`; + +export const CustomSlider = (props: any) => ( + +); diff --git a/src/components/view/CustomSwitch.tsx b/src/components/view/CustomSwitch.tsx new file mode 100644 index 0000000..ad15b9a --- /dev/null +++ b/src/components/view/CustomSwitch.tsx @@ -0,0 +1,34 @@ +'use client'; + +import React from 'react'; +import styled from 'styled-components'; +import { Switch as AntdSwitch } from 'antd'; + +const Switch = styled(AntdSwitch)` + height: 24px !important; + background: #F8F8F7 !important; + + .ant-switch-handle { + height: 24px !important; + width: 24px !important; + top: 0 !important; + + &::before { + box-shadow: none !important; + background: #C4DFE6 !important; + border-radius: 50% !important; + } + } + + &.ant-switch-checked { + background: #F8F8F7 !important; + + .ant-switch-handle::before { + background: #66A5AD !important; + } + } +`; + +export const CustomSwitch = (props: any) => ( + +); diff --git a/src/components/view/index.ts b/src/components/view/index.ts new file mode 100644 index 0000000..380f0db --- /dev/null +++ b/src/components/view/index.ts @@ -0,0 +1,7 @@ +'use client'; + +export * from './CustomSwitch'; +export * from './CustomSlider'; +export * from './CustomPagination'; +export * from './CustomRate'; +export * from './CustomInput'; diff --git a/src/constants/common.ts b/src/constants/common.ts new file mode 100644 index 0000000..d8bee4d --- /dev/null +++ b/src/constants/common.ts @@ -0,0 +1 @@ +export const BASE_URL = process.env.NEXT_PUBLIC_SERVER_BASE_URL || 'https://api.bbuddy.expert/api'; diff --git a/src/lib/apiClient.ts b/src/lib/apiClient.ts new file mode 100644 index 0000000..f6beada --- /dev/null +++ b/src/lib/apiClient.ts @@ -0,0 +1,33 @@ +import axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios'; +import { BASE_URL } from '../constants/common'; +// import { getAuthToken } from '../../utils'; + +export const onSuccessRequestCallback = (config: InternalAxiosRequestConfig) => { + const newConfig = { ...config }; + + // if (!newConfig.headers) { + // newConfig.headers = {}; + // } + // + // if (IS_DEV && !newConfig.headers.Authorization && getAuthToken()) { + // newConfig.headers.Authorization = `Bearer ${getAuthToken()}`; + // } + newConfig.headers['Content-Type'] = 'application/json'; + + return newConfig; +}; + +export const onSuccessResponseCallback = (response: AxiosResponse) => response; + +export const onErrorResponseCallback = (error: any) => Promise.reject(error); + +export const apiClient = axios.create({ + baseURL: BASE_URL +}); + +apiClient.interceptors.request.use(onSuccessRequestCallback); + +apiClient.interceptors.response.use( + onSuccessResponseCallback, + onErrorResponseCallback +); diff --git a/src/middleware.ts b/src/middleware.ts index 24342a4..6ff174d 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -9,4 +9,5 @@ export default createMiddleware({ export const config = { matcher: ['/', '/(en|ru|de|it|es|fr)/:path*'] + // matcher: ['/', '/(en|ru|de|it|es|fr).html'] }; diff --git a/src/styles/_auth-modal.scss b/src/styles/_auth-modal.scss new file mode 100644 index 0000000..09d458f --- /dev/null +++ b/src/styles/_auth-modal.scss @@ -0,0 +1,29 @@ +.b { + &-modal { + &__auth { + &__content { + padding: 80px 76px 68px; + display: flex; + flex-direction: column; + gap: 16px; + text-align: center; + + span, div { + font-size: 13px; + } + + & > span { + color: #66A5AD; + } + } + + &__logo { + margin-bottom: 16px; + } + + &__agreement { + + } + } + } +} diff --git a/src/styles/_default.scss b/src/styles/_default.scss index 7472a59..fad40a2 100644 --- a/src/styles/_default.scss +++ b/src/styles/_default.scss @@ -10,6 +10,10 @@ body{ background-color: #ffffff; } +*::selection { + background-color: #2C7873; + color: #fff; +} .b-wrapper { width: 100%; @@ -305,6 +309,12 @@ body{ gap: 16px; } + &__slider { + width: 100%; + position: relative; + margin: 8px 0 16px -5px; + } + &__title { color: $black; @include rem(15); @@ -480,18 +490,20 @@ body{ // .card-profile { - display: flex; + display: flex !important; flex-direction: column; - gap: 8px; - padding-bottom: 8px; - border-bottom: 1px solid #C4DFE6; + gap: 8px !important; + padding: 0 0 8px !important; + border-block-end: 1px solid #C4DFE6 !important; + margin: 0 0 16px !important; &__header { display: flex; padding-bottom: 8px; - align-items: center; + align-items: center !important; gap: 16px; align-self: stretch; + margin-block-end: 0 !important; &__portrait { width: 86px; @@ -499,8 +511,9 @@ body{ border-radius: 16px; border: 2px solid #FFF; background: lightgray 50%; - box-shadow: 0px 8px 16px 0px rgba(102, 165, 173, 0.32); + box-shadow: 0 8px 16px 0 rgba(102, 165, 173, 0.32); overflow: hidden; + margin-right: -16px; img { object-fit: cover; @@ -599,70 +612,29 @@ body{ align-self: stretch; &__item { - height: 22px; - border-radius: 4px; - background: #2C7873; - display: inline-flex; - padding: 4px; - color: #FFF; - @include rem(12); + margin-inline-end: 0 !important; + padding-inline: 4px !important; + font-size: 0.75rem; font-style: normal; font-weight: 300; - line-height: 116.667%; - align-items: center; + line-height: 20px; + background: #2C7873 !important; + border-color: #2C7873 !important; + color: #fff !important; + height: 22px; + text-transform: capitalize; } &__more { - height: 22px; - display: inline-flex; - align-items: center; - padding: 4px; - border-radius: 4px; - border: 1px solid #2C7873; - color: #2C7873; - @include rem(12); + margin-inline-end: 0 !important; + padding-inline: 4px !important; + font-size: 0.75rem; font-style: normal; font-weight: 300; - line-height: 116.667%; - } -} - -.pagination { - display: flex; - gap: 8px; - - .page-item { - border-radius: 8px; - display: inline-flex; - height: 40px; - width: 40px; - - .page-link { - border-radius: 8px; - border: 1px solid #2C7873; - display: inline-flex; - padding: 8px 16px; - justify-content: center; - align-items: center; - background: $white; - height: 40px; - width: 40px; - color: #2C7873; - text-align: center; - font-family: 'Inter', sans-serif; - @include rem(16); - font-style: normal; - font-weight: 400; - line-height: 150%; - text-decoration: none; - } - - &.active { - .page-link { - background: #2C7873; - color: $white; - } - } + line-height: 22px; + border-color: #2C7873 !important; + color: #2C7873 !important; + height: 22px; } } @@ -740,17 +712,17 @@ body{ &__rating { display: flex; - align-items: center; gap: 8px; flex-flow: wrap; - span { + & > span { display: block; color: #2C7873; @include rem(13); font-style: normal; font-weight: 500; line-height: 123.077%; + padding-top: 9px; } img { diff --git a/src/styles/_main.scss b/src/styles/_main.scss index fe5c6b0..64ad623 100644 --- a/src/styles/_main.scss +++ b/src/styles/_main.scss @@ -610,10 +610,3 @@ } } } - -.search-result { - display: flex; - flex-direction: column; - gap: 16px; - margin-bottom: 16px; -} diff --git a/src/styles/style.scss b/src/styles/style.scss index 10c8b40..cc358e9 100644 --- a/src/styles/style.scss +++ b/src/styles/style.scss @@ -9,5 +9,6 @@ @import "_pages.scss"; @import "_form.scss"; @import "_message.scss"; +@import "_auth-modal.scss"; diff --git a/src/types/experts.ts b/src/types/experts.ts index debbff2..2f48836 100644 --- a/src/types/experts.ts +++ b/src/types/experts.ts @@ -1,7 +1,108 @@ export type Filter = Record; +// export type Filter = { +// themesTagIds: number[]; +// priceFrom?: number | null; +// priceTo?: number | null; +// durationFrom?: number | null; +// durationTo?: number | null; +// }; + export type AdditionalFilter = { text?: string; sort?: string; language?: string[]; }; + +export type Tag = { + id: number; + groupId: number; + name: string + couchCount?: number; + group?: string | null; +}; + +export type File = { + id: number; + fileType: string; + url: string; +}; + +export interface ExpertDocument { + fileName: string; + original?: File; + preview?: File; + fullSize?: File; +} + +export type Details = { + id: number; + userId?:number; + title?: string; + description?: string; + document?: ExpertDocument; +}; + +export type Certificate = { + id: number; + userId?: number; + associationLevelId?: number; + document?: ExpertDocument; +}; + +export type Practice = { + id: number; + userId?: number; + description?: string; + themesGroupIds?: number[]; +}; + +export type ThemeGroup = { + id: number; + name: string; + isActive?: boolean; + canDeleted?: boolean; +}; + +export type Association = { + id: number; + name: string; +}; + +export type AssociationLevel = { + id: number; + associationId: number; + name: string; +}; + +export interface ExpertItem { + id: number; + name: string; + surname?: string; + faceImageUrl?: string; + sessionDuration: number; + sessionCost: number; + coachRating?: number; + tags: Tag[]; + speciality?: string; + specialityDesc?: string; + description?: string; +} + +export type ExpertsData = ExpertItem[]; + +export type ExpertDetails = { + publicCoachDetails: ExpertItem & { + practiceHours?: number; + supervisionPerYearId?: number; + educations?: Details[]; + certificates?: Certificate[]; + trainings?: Details[]; + mbas?: Details[]; + experiences?: Details[]; + practiceCases?: Practice[]; + themesGroups?: ThemeGroup[]; + }; + associations?: Association[]; + associationLevels?: AssociationLevel[]; +}; diff --git a/tsconfig.json b/tsconfig.json index b28df48..e3932e2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,7 +29,8 @@ "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", - "dist/types/**/*.ts" + "dist/types/**/*.ts", + "build/types/**/*.ts" ], "exclude": [ "node_modules"