diff --git a/messages/en.json b/messages/en.json
index 1c54f5a..cbee258 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -1,14 +1,4 @@
{
- "Header": {
- "registration": "Registration",
- "enter": "Enter",
- "account": "My Account",
- "menu": {
- "bb-client": "Start grow with BB",
- "bb-expert": "Become BB Expert",
- "blog": "Blog&News"
- }
- },
"Main": {
"title": "Bbuddy - Main",
"description": "Bbuddy desc",
@@ -29,15 +19,6 @@
"header-desc": "B Buddy is an application for active people interested in growth on all fronts — personal, professional and business. Right now they are looking for you."
},
"Account": {
- "menu": {
- "sessions": "Upcoming Sessions",
- "notifications": "Notification",
- "support": "Help & Support",
- "information": "Legal Information",
- "settings": "Profile Settings",
- "messages": "Messages",
- "work-with-us": "Work With Us"
- },
"WorkWithUs": {
"title": "Become a BBuddy Expert",
"insert-info": "Insert your personal information to start your journey as a BBuddy Expert",
diff --git a/package-lock.json b/package-lock.json
index 168e126..cfa03e5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,6 +10,7 @@
"dependencies": {
"@ant-design/cssinjs": "^1.18.1",
"@ant-design/icons": "^5.2.6",
+ "@ant-design/nextjs-registry": "^1.0.0",
"antd": "^5.12.1",
"antd-img-crop": "^4.21.0",
"axios": "^1.6.5",
@@ -56,15 +57,15 @@
}
},
"node_modules/@ant-design/cssinjs": {
- "version": "1.18.1",
- "resolved": "https://registry.npmjs.org/@ant-design/cssinjs/-/cssinjs-1.18.1.tgz",
- "integrity": "sha512-1JURAPrsjK1GwpqByTq3bJ7nF7lbMKDZpehqeR2n8/IR5O58/W1U4VcOeaw5ZyTHri3tEMcom7dyP2tvxpW54g==",
+ "version": "1.18.5",
+ "resolved": "https://registry.npmjs.org/@ant-design/cssinjs/-/cssinjs-1.18.5.tgz",
+ "integrity": "sha512-Ub4n3d+MAX/qtE5S9PM8iOn5ocU7GUAIC4Adc2X8UCMXnsRRfpJBHsBdtQ1qoAuaQ7lU2M1BTCuJ+fkv4fOWiw==",
"dependencies": {
"@babel/runtime": "^7.11.1",
"@emotion/hash": "^0.8.0",
"@emotion/unitless": "^0.7.5",
"classnames": "^2.3.1",
- "csstype": "3.1.2",
+ "csstype": "^3.1.3",
"rc-util": "^5.35.0",
"stylis": "^4.0.13"
},
@@ -97,6 +98,18 @@
"resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.3.1.tgz",
"integrity": "sha512-4QBZg8ccyC6LPIRii7A0bZUk3+lEDCLnhB+FVsflGdcWPPmV+j3fire4AwwoqHV/BibgvBmR9ZIo4s867smv+g=="
},
+ "node_modules/@ant-design/nextjs-registry": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@ant-design/nextjs-registry/-/nextjs-registry-1.0.0.tgz",
+ "integrity": "sha512-kU1K1UOhwrF6DPv73MhuL5a6U4e6/TiFapeLUt/c/kch9h5qFwEaJPb4RSJKNw0PRBfqCAPS011wVm4wYcrqbQ==",
+ "peerDependencies": {
+ "@ant-design/cssinjs": "^1.18.2",
+ "antd": "^5.0.0",
+ "next": "^14.0.0",
+ "react": ">=16.0.0",
+ "react-dom": ">=16.0.0"
+ }
+ },
"node_modules/@ant-design/react-slick": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@ant-design/react-slick/-/react-slick-1.0.2.tgz",
@@ -1524,9 +1537,9 @@
}
},
"node_modules/csstype": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
- "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
+ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
},
"node_modules/damerau-levenshtein": {
"version": "1.0.8",
@@ -5355,15 +5368,15 @@
}
},
"@ant-design/cssinjs": {
- "version": "1.18.1",
- "resolved": "https://registry.npmjs.org/@ant-design/cssinjs/-/cssinjs-1.18.1.tgz",
- "integrity": "sha512-1JURAPrsjK1GwpqByTq3bJ7nF7lbMKDZpehqeR2n8/IR5O58/W1U4VcOeaw5ZyTHri3tEMcom7dyP2tvxpW54g==",
+ "version": "1.18.5",
+ "resolved": "https://registry.npmjs.org/@ant-design/cssinjs/-/cssinjs-1.18.5.tgz",
+ "integrity": "sha512-Ub4n3d+MAX/qtE5S9PM8iOn5ocU7GUAIC4Adc2X8UCMXnsRRfpJBHsBdtQ1qoAuaQ7lU2M1BTCuJ+fkv4fOWiw==",
"requires": {
"@babel/runtime": "^7.11.1",
"@emotion/hash": "^0.8.0",
"@emotion/unitless": "^0.7.5",
"classnames": "^2.3.1",
- "csstype": "3.1.2",
+ "csstype": "^3.1.3",
"rc-util": "^5.35.0",
"stylis": "^4.0.13"
}
@@ -5385,6 +5398,12 @@
"resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.3.1.tgz",
"integrity": "sha512-4QBZg8ccyC6LPIRii7A0bZUk3+lEDCLnhB+FVsflGdcWPPmV+j3fire4AwwoqHV/BibgvBmR9ZIo4s867smv+g=="
},
+ "@ant-design/nextjs-registry": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@ant-design/nextjs-registry/-/nextjs-registry-1.0.0.tgz",
+ "integrity": "sha512-kU1K1UOhwrF6DPv73MhuL5a6U4e6/TiFapeLUt/c/kch9h5qFwEaJPb4RSJKNw0PRBfqCAPS011wVm4wYcrqbQ==",
+ "requires": {}
+ },
"@ant-design/react-slick": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@ant-design/react-slick/-/react-slick-1.0.2.tgz",
@@ -6413,9 +6432,9 @@
}
},
"csstype": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
- "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
+ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
},
"damerau-levenshtein": {
"version": "1.0.8",
diff --git a/package.json b/package.json
index 25dc63f..35d2112 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,7 @@
"dependencies": {
"@ant-design/cssinjs": "^1.18.1",
"@ant-design/icons": "^5.2.6",
+ "@ant-design/nextjs-registry": "^1.0.0",
"antd": "^5.12.1",
"antd-img-crop": "^4.21.0",
"axios": "^1.6.5",
diff --git a/src/app/[locale]/(main)/@directions/page.tsx b/src/app/[locale]/(main)/@directions/page.tsx
index 3aa0deb..339743a 100644
--- a/src/app/[locale]/(main)/@directions/page.tsx
+++ b/src/app/[locale]/(main)/@directions/page.tsx
@@ -9,13 +9,13 @@ export default function Directions() {
-
+
@@ -23,13 +23,13 @@ export default function Directions() {
-
+
@@ -37,13 +37,13 @@ export default function Directions() {
-
+
@@ -51,13 +51,13 @@ export default function Directions() {
-
+
@@ -65,13 +65,13 @@ export default function Directions() {
-
+
@@ -79,13 +79,13 @@ export default function Directions() {
-
+
diff --git a/src/app/[locale]/account/(account)/information/page.tsx b/src/app/[locale]/account/(account)/information/page.tsx
index 95d8933..42e1f74 100644
--- a/src/app/[locale]/account/(account)/information/page.tsx
+++ b/src/app/[locale]/account/(account)/information/page.tsx
@@ -1,19 +1,20 @@
import React from 'react';
import type { Metadata } from 'next';
import { useTranslations } from 'next-intl';
+import { i18nText } from '../../../../../i18nKeys';
export const metadata: Metadata = {
title: 'Bbuddy - Account - Information',
description: 'Bbuddy desc information'
};
-export default function Information() {
+export default function Information({ params: { locale } }: { params: { locale: string } }) {
const t = useTranslations('Account.LegalInformation');
return (
<>
- - {t('title')}
+ - {i18nText('accountMenu.information', locale)}
Welcome to the B BUDDY LTD’s privacy policy.
diff --git a/src/app/[locale]/account/(account)/layout.tsx b/src/app/[locale]/account/(account)/layout.tsx
index b154c58..5c46a60 100644
--- a/src/app/[locale]/account/(account)/layout.tsx
+++ b/src/app/[locale]/account/(account)/layout.tsx
@@ -29,7 +29,7 @@ export default function AccountInnerLayout({ children, params: { locale } }: Acc
diff --git a/src/app/[locale]/account/(account)/messages/[textId]/page.tsx b/src/app/[locale]/account/(account)/messages/[textId]/page.tsx
index f79a221..669063c 100644
--- a/src/app/[locale]/account/(account)/messages/[textId]/page.tsx
+++ b/src/app/[locale]/account/(account)/messages/[textId]/page.tsx
@@ -1,6 +1,7 @@
import React from 'react';
import { useTranslations } from 'next-intl';
import { Link } from '../../../../../../navigation';
+import { i18nText } from '../../../../../../i18nKeys';
export function generateStaticParams({
params: { locale },
@@ -15,7 +16,7 @@ export function generateStaticParams({
return result;
}
-export default function Message({ params }: { params: { textId: string } }) {
+export default function Message({ params }: { params: { locale: string, textId: string } }) {
const t = useTranslations('Account.Messages');
return (
@@ -23,7 +24,7 @@ export default function Message({ params }: { params: { textId: string } }) {
-
- {t('title')}
+ {i18nText('accountMenu.messages', params.locale)}
- {`Person ${params.textId}`}
diff --git a/src/app/[locale]/account/(account)/messages/page.tsx b/src/app/[locale]/account/(account)/messages/page.tsx
index 98d8fa7..56b40d6 100644
--- a/src/app/[locale]/account/(account)/messages/page.tsx
+++ b/src/app/[locale]/account/(account)/messages/page.tsx
@@ -2,23 +2,24 @@ import React, { Suspense } from 'react';
import type { Metadata } from 'next';
import { useTranslations } from 'next-intl';
import { Link } from '../../../../../navigation';
-import { CustomInput } from '../../../../../components/view';
+import { CustomInput } from '../../../../../components/view/CustomInput';
+import { i18nText } from '../../../../../i18nKeys';
export const metadata: Metadata = {
title: 'Bbuddy - Account - Messages',
description: 'Bbuddy desc messages'
};
-export default function Messages() {
+export default function Messages({ params: { locale } }: { params: { locale: string } }) {
const t = useTranslations('Account.Messages');
return (
<>
- - {t('title')}
+ - {i18nText('accountMenu.messages', locale)}
-
+
-
- David
- 14
-
-
- Lorem ipsum dolor sit at, consecte...
-
-
- 25 may
+
+
+ David
+ 14
+
+
+ Lorem ipsum dolor sit at, consecte...
+
+
+ 25 may
+
@@ -52,12 +55,14 @@ export default function Messages() {
-
David
-
- Lorem ipsum dolor sit at, consecte...
-
-
- 25 may
+
+
David
+
+ Lorem ipsum dolor sit at, consecte...
+
+
+ 25 may
+
@@ -71,12 +76,14 @@ export default function Messages() {
-
David
-
- Lorem ipsum dolor sit at, consecte...
-
-
- 25 may
+
+
David
+
+ Lorem ipsum dolor sit at, consecte...
+
+
+ 25 may
+
diff --git a/src/app/[locale]/account/(account)/notifications/page.tsx b/src/app/[locale]/account/(account)/notifications/page.tsx
index 3491dda..0806009 100644
--- a/src/app/[locale]/account/(account)/notifications/page.tsx
+++ b/src/app/[locale]/account/(account)/notifications/page.tsx
@@ -1,19 +1,26 @@
import React from 'react';
import type { Metadata } from 'next';
-import { useTranslations } from 'next-intl';
+import dayjs from 'dayjs';
+import 'dayjs/locale/ru';
+import 'dayjs/locale/en';
+import 'dayjs/locale/de';
+import 'dayjs/locale/it';
+import 'dayjs/locale/fr';
+import 'dayjs/locale/es';
+import { i18nText } from '../../../../../i18nKeys';
export const metadata: Metadata = {
title: 'Bbuddy - Account - Notifications',
description: 'Bbuddy desc notifications'
};
-export default function Notifications() {
- const t = useTranslations('Account.Notifications');
+export default function Notifications({ params: { locale } }: { params: { locale: string } }) {
+ const date = dayjs('2022-05-22').locale(locale);
return (
<>
- - {t('title')}
+ - {i18nText('accountMenu.notifications', locale)}
@@ -21,9 +28,9 @@ export default function Notifications() {
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc auctor leo eu justo molestie
-
25 may 2022
+
{date.format('D MMMM YYYY')}
@@ -31,9 +38,9 @@ export default function Notifications() {
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc auctor leo eu justo molestie
-
25 may 2022
+
{date.format('D MMMM YYYY')}
@@ -41,9 +48,9 @@ export default function Notifications() {
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc auctor leo eu justo molestie
-
25 may 2022
+
{date.format('D MMMM YYYY')}
diff --git a/src/app/[locale]/account/(account)/sessions/page.tsx b/src/app/[locale]/account/(account)/sessions/page.tsx
index 148dcbb..6262afe 100644
--- a/src/app/[locale]/account/(account)/sessions/page.tsx
+++ b/src/app/[locale]/account/(account)/sessions/page.tsx
@@ -15,13 +15,6 @@ export default function Sessions({ params: { locale } }: { params: { locale: str
Loading...}>
);
diff --git a/src/app/[locale]/account/(account)/settings/change-password/page.tsx b/src/app/[locale]/account/(account)/settings/change-password/page.tsx
index d794487..f0e03b0 100644
--- a/src/app/[locale]/account/(account)/settings/change-password/page.tsx
+++ b/src/app/[locale]/account/(account)/settings/change-password/page.tsx
@@ -1,31 +1,29 @@
import React from 'react';
-import { useTranslations } from 'next-intl';
import { Link } from '../../../../../../navigation';
+import { i18nText } from '../../../../../../i18nKeys/';
-export default function ChangePassword({ params }: { params: { userId: string } }) {
- const t = useTranslations('Account.Settings');
-
+export default function ChangePassword({ params: { locale } }: { params: { locale: string } }) {
return (
<>
-
-
- {t('title')}
+
+ {i18nText('accountMenu.settings', locale)}
- - {t('change-password')}
+ - {i18nText('changePass', locale)}
>
);
diff --git a/src/app/[locale]/account/(account)/settings/page.tsx b/src/app/[locale]/account/(account)/settings/page.tsx
index ea3de58..691e68a 100644
--- a/src/app/[locale]/account/(account)/settings/page.tsx
+++ b/src/app/[locale]/account/(account)/settings/page.tsx
@@ -2,6 +2,7 @@ import React, { Suspense } from 'react';
import type { Metadata } from 'next';
import { useTranslations } from 'next-intl';
import { ProfileSettings } from '../../../../../components/Account';
+import { i18nText } from '../../../../../i18nKeys';
export const metadata: Metadata = {
title: 'Bbuddy - Account - Profile Settings',
@@ -14,19 +15,10 @@ export default function Settings({ params: { locale } }: { params: { locale: str
return (
<>
- - {t('title')}
+ - {i18nText('accountMenu.settings', locale)}
-
+
>
);
diff --git a/src/app/[locale]/account/(account)/support/page.tsx b/src/app/[locale]/account/(account)/support/page.tsx
index 8ed974b..2443916 100644
--- a/src/app/[locale]/account/(account)/support/page.tsx
+++ b/src/app/[locale]/account/(account)/support/page.tsx
@@ -1,19 +1,17 @@
import React from 'react';
import type { Metadata } from 'next';
-import { useTranslations } from 'next-intl';
+import { i18nText } from '../../../../../i18nKeys';
export const metadata: Metadata = {
title: 'Bbuddy - Account - Help & Support',
description: 'Bbuddy desc help & support'
};
-export default function Support() {
- const t = useTranslations('Account.Support');
-
+export default function Support({ params: { locale } }: { params: { locale: string } }) {
return (
<>
- - {t('title')}
+ - {i18nText('accountMenu.support', locale)}
some text
diff --git a/src/app/[locale]/account/(account)/work-with-us/coaching/add-offer/page.tsx b/src/app/[locale]/account/(account)/work-with-us/coaching/add-offer/page.tsx
index f321464..04ec673 100644
--- a/src/app/[locale]/account/(account)/work-with-us/coaching/add-offer/page.tsx
+++ b/src/app/[locale]/account/(account)/work-with-us/coaching/add-offer/page.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import { Link } from '../../../../../../../navigation';
-import { CustomSelect } from '../../../../../../../components/view';
+import { CustomSelect } from '../../../../../../../components/view/CustomSelect';
export default function AddOffer() {
return (
diff --git a/src/app/[locale]/account/(account)/work-with-us/new-topic/page.tsx b/src/app/[locale]/account/(account)/work-with-us/new-topic/page.tsx
index 249ba8a..a7b33ed 100644
--- a/src/app/[locale]/account/(account)/work-with-us/new-topic/page.tsx
+++ b/src/app/[locale]/account/(account)/work-with-us/new-topic/page.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import { Link } from '../../../../../../navigation';
-import { CustomSelect } from '../../../../../../components/view';
+import { CustomSelect } from '../../../../../../components/view/CustomSelect';
export default function NewTopic() {
return (
diff --git a/src/app/[locale]/account/(account)/work-with-us/page.tsx b/src/app/[locale]/account/(account)/work-with-us/page.tsx
index 783130c..08c2b83 100644
--- a/src/app/[locale]/account/(account)/work-with-us/page.tsx
+++ b/src/app/[locale]/account/(account)/work-with-us/page.tsx
@@ -1,27 +1,28 @@
import React from 'react';
import type { Metadata } from 'next';
import { useTranslations } from 'next-intl';
+import { i18nText } from '../../../../../i18nKeys';
export const metadata: Metadata = {
title: 'Bbuddy - Account - Work with us',
description: 'Bbuddy desc work with us'
};
-export default function WorkWithUs() {
+export default function WorkWithUs({ params: { locale } }: { params: { locale: string } }) {
const t = useTranslations('Account.WorkWithUs');
return (
<>
- - {t('title')}
+ - {i18nText('accountMenu.work-with-us', locale)}
-
{t('insert-info')}
-
-
{t('base-text')}
+
{i18nText('insertInfo', locale)}
+
+
{i18nText('changeUserData', locale)}
>
);
diff --git a/src/app/[locale]/experts/[expertId]/page.tsx b/src/app/[locale]/experts/[expertId]/page.tsx
index ba143d3..e71a855 100644
--- a/src/app/[locale]/experts/[expertId]/page.tsx
+++ b/src/app/[locale]/experts/[expertId]/page.tsx
@@ -9,7 +9,7 @@ import {
ExpertPractice
} from '../../../../components/Experts/ExpertDetails';
import { Details } from '../../../../types/experts';
-import { BackButton } from '../../../../components/view';
+import { BackButton } from '../../../../components/view/BackButton';
export const metadata: Metadata = {
title: 'Bbuddy - Experts item',
diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx
index 68882b7..520e6ae 100644
--- a/src/app/[locale]/layout.tsx
+++ b/src/app/[locale]/layout.tsx
@@ -3,10 +3,9 @@ import { Metadata } from 'next';
import { unstable_setRequestLocale } from 'next-intl/server';
import { notFound } from 'next/navigation';
import { ConfigProvider } from 'antd';
+import { AntdRegistry } from '@ant-design/nextjs-registry';
import theme from '../../constants/theme';
import { ALLOWED_LOCALES } from '../../constants/locale';
-import StyledComponentsRegistry from '../../lib/AntdRegistry';
-import StyledRegistry from '../../lib/StyleRegistry';
import { Header, Footer } from '../../components/Page';
type LayoutProps = {
@@ -28,18 +27,16 @@ export default function LocaleLayout({ children, params: { locale } }: LayoutPro
unstable_setRequestLocale(locale);
return (
-
-
-
-
-
-
- {children}
-
-
+
+
+
+
+
+ {children}
-
-
-
+
+
+
+
);
};
diff --git a/src/app/global-error.tsx b/src/app/global-error.tsx
index 612defe..2a93895 100644
--- a/src/app/global-error.tsx
+++ b/src/app/global-error.tsx
@@ -3,9 +3,9 @@
import React from 'react';
import Link from 'next/link';
import { Button, ConfigProvider } from 'antd';
+import { AntdRegistry } from '@ant-design/nextjs-registry';
import { comfortaa, inter } from './fonts';
import StyledRegistry from '../lib/StyleRegistry';
-import StyledComponentsRegistry from '../lib/AntdRegistry';
import theme from '../constants/theme';
export default function GlobalError({
@@ -18,8 +18,8 @@ export default function GlobalError({
return (
-
-
+
+
@@ -57,8 +57,8 @@ export default function GlobalError({
-
-
+
+
);
diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx
index 047d48a..ffbffa1 100644
--- a/src/app/not-found.tsx
+++ b/src/app/not-found.tsx
@@ -1,18 +1,18 @@
import React from 'react';
import { ConfigProvider } from 'antd';
+import { AntdRegistry } from '@ant-design/nextjs-registry';
import Link from 'next/link';
import { comfortaa, inter } from './fonts';
-import StyledComponentsRegistry from '../lib/AntdRegistry';
import StyledRegistry from '../lib/StyleRegistry';
import theme from '../constants/theme';
-import { BackButton } from '../components/view';
+import { BackButton } from '../components/view/BackButton';
export default function NotFound() {
return (
-
-
+
+
@@ -51,8 +51,8 @@ export default function NotFound() {
-
-
+
+
);
diff --git a/src/components/Account/AccountMenu.tsx b/src/components/Account/AccountMenu.tsx
index e4d089d..8624fcb 100644
--- a/src/components/Account/AccountMenu.tsx
+++ b/src/components/Account/AccountMenu.tsx
@@ -7,6 +7,7 @@ import { useSelectedLayoutSegment, usePathname } from 'next/navigation';
import { Link } from '../../navigation';
import { AUTH_TOKEN_KEY, AUTH_USER } from '../../constants/common';
import { deleteStorageKey } from '../../hooks/useLocalStorage';
+import { i18nText } from '../../i18nKeys';
const Logout = styled(Button)`
width: 100%;
@@ -19,7 +20,7 @@ const Logout = styled(Button)`
text-align: left !important;
`;
-export const AccountMenu = ({ menu }: { menu: { path: string, title: string, count?: number }[] }) => {
+export const AccountMenu = ({ menu, locale }: { menu: { path: string, title: string, count?: number }[], locale: string }) => {
const selectedLayoutSegment = useSelectedLayoutSegment();
const pathname = selectedLayoutSegment || '';
const paths = usePathname();
@@ -51,7 +52,7 @@ export const AccountMenu = ({ menu }: { menu: { path: string, title: string, cou
type="link"
onClick={onLogout}
>
- Log Out
+ {i18nText('logout', locale)}
@@ -59,7 +60,7 @@ export const AccountMenu = ({ menu }: { menu: { path: string, title: string, cou
type="link"
onClick={onDeleteAccount}
>
- Delete account
+ {i18nText('deleteAcc', locale)}
diff --git a/src/components/Account/ProfileSettings.tsx b/src/components/Account/ProfileSettings.tsx
index fb5acb1..e40ee88 100644
--- a/src/components/Account/ProfileSettings.tsx
+++ b/src/components/Account/ProfileSettings.tsx
@@ -6,33 +6,18 @@ import type { UploadFile, UploadProps } from 'antd';
import ImgCrop from 'antd-img-crop';
import { CameraOutlined } from '@ant-design/icons';
import { Link } from '../../navigation';
-import { CustomInput } from '../view';
+import { CustomInput } from '../view/CustomInput';
import { Profile } from '../../types/profile';
import { useProfileSettings } from '../../actions/hooks/useProfileSettings';
+import { i18nText } from '../../i18nKeys';
type ProfileSettingsProps = {
locale: string;
- photoDesc?: string;
- placeholderName?: string;
- placeholderSurname?: string;
- placeholderBirthday?: string;
- placeholderEmail?: string;
- changePasswordLink?: string;
- saveButton?: string;
};
// type FileType = Parameters
>[0];
-export const ProfileSettings: FC = ({
- locale,
- photoDesc,
- placeholderName,
- placeholderSurname,
- placeholderBirthday,
- placeholderEmail,
- changePasswordLink,
- saveButton
-}) => {
+export const ProfileSettings: FC = ({ locale }) => {
const [form] = Form.useForm();
const { profileSettings } = useProfileSettings(locale);
@@ -66,13 +51,13 @@ export const ProfileSettings: FC = ({
return (
>
@@ -114,7 +113,7 @@ export const SessionsTabs = ({ intlConfig, locale }: { intlConfig: Record
- {intlConfig?.upcoming || 'Tab 1'}
+ {i18nText('session.upcoming', locale)}
{sessions?.upcoming && sessions?.upcoming?.length > 0 ? ({sessions?.upcoming.length}) : null}
>
),
@@ -124,7 +123,7 @@ export const SessionsTabs = ({ intlConfig, locale }: { intlConfig: Record
- {intlConfig?.requested || 'Tab 2'}
+ {i18nText('session.requested', locale)}
{sessions?.requested && sessions?.requested?.length > 0 ? ({sessions?.requested.length}) : null}
>
),
@@ -132,7 +131,7 @@ export const SessionsTabs = ({ intlConfig, locale }: { intlConfig: Record
{tabs.map((tab, index) => (
- setActiveTab(index)}
>
{tab.label}
-
+
))}
{tabs[activeTab].children}
diff --git a/src/components/Account/index.ts b/src/components/Account/index.ts
index 28b7629..435b58a 100644
--- a/src/components/Account/index.ts
+++ b/src/components/Account/index.ts
@@ -1,3 +1,5 @@
+'use client'
+
export { AccountMenu } from './AccountMenu';
export { SessionsTabs } from './SessionsTabs';
export { ProfileSettings } from './ProfileSettings';
diff --git a/src/components/Experts/AdditionalFilter.tsx b/src/components/Experts/AdditionalFilter.tsx
index 1174064..08d6cf9 100644
--- a/src/components/Experts/AdditionalFilter.tsx
+++ b/src/components/Experts/AdditionalFilter.tsx
@@ -6,18 +6,18 @@ import debounce from 'lodash/debounce';
import { useRouter } from '../../navigation';
import { AdditionalFilter } from '../../types/experts';
import { getObjectByFilter, getObjectByAdditionalFilter } from '../../utils/filter';
-import { CustomInput, CustomSelect } from '../view';
+import { CustomInput } from '../view/CustomInput';
+import { CustomSelect } from '../view/CustomSelect';
+import { i18nText } from '../../i18nKeys';
type ExpertAdditionalFilterProps = {
- searchPlaceholder: string;
- sortLabel: string;
basePath: string;
+ locale: string;
};
export const ExpertsAdditionalFilter = ({
- searchPlaceholder,
- sortLabel,
basePath,
+ locale
}: ExpertAdditionalFilterProps) => {
const searchParams = useSearchParams();
const router = useRouter();
@@ -65,7 +65,7 @@ export const ExpertsAdditionalFilter = ({
diff --git a/src/components/Experts/Experts.tsx b/src/components/Experts/Experts.tsx
index 351752e..29df831 100644
--- a/src/components/Experts/Experts.tsx
+++ b/src/components/Experts/Experts.tsx
@@ -1,5 +1,4 @@
import React from 'react';
-import { getTranslations } from 'next-intl/server';
import { DEFAULT_PAGE_SIZE } from '../../constants/common';
import { getFilter } from '../../utils/filter';
import { getTagList, getLanguages } from '../../actions/tags';
@@ -7,6 +6,7 @@ import { getExpertsList } from '../../actions/experts';
import { ExpertsFilter } from './Filter';
import { ExpertsAdditionalFilter } from './AdditionalFilter';
import { ExpertsList } from './ExpertsList';
+import { i18nText } from '../../i18nKeys';
type ExpertsProps = {
basePath?: string;
@@ -15,11 +15,14 @@ type ExpertsProps = {
};
export const Experts = async ({ basePath = '/', locale, pageSize = DEFAULT_PAGE_SIZE }: ExpertsProps) => {
- const t = await getTranslations('Experts');
const searchData = await getTagList(locale);
const languages = await getLanguages(locale);
const filter = getFilter({ pageSize });
const experts = await getExpertsList(filter, locale);
+ const durFrom = `${searchData?.sessionCostMin || 0}${locale === 'ru' ? 'мин' : 'min'}`;
+ const durTo = `${searchData?.sessionDurationMax || 0}${locale === 'ru' ? 'мин' : 'min'}`;
+ const priceFrom = `${searchData?.sessionCostMin || 0}€`;
+ const priceTo = `${searchData?.sessionCostMax || 0}€`;
return (
@@ -28,15 +31,14 @@ export const Experts = async ({ basePath = '/', locale, pageSize = DEFAULT_PAGE_
searchData={searchData}
languages={languages}
basePath={basePath}
- priceTitle={t('filter.price', { from: searchData?.sessionCostMin || 0, to: searchData?.sessionCostMax || 0 })}
- durationTitle={t('filter.duration', { from: searchData?.sessionDurationMin || 0, to: searchData?.sessionDurationMax || 0 })}
- buttonApply={t('filter.apply')}
+ locale={locale}
+ priceTitle={i18nText('fromTo', locale).replace('$', priceFrom).replace('$', priceTo)}
+ durationTitle={i18nText('fromTo', locale).replace('$', durFrom).replace('$', durTo)}
/>
diff --git a/src/components/Experts/ExpertsList.tsx b/src/components/Experts/ExpertsList.tsx
index 0ceb5eb..59df305 100644
--- a/src/components/Experts/ExpertsList.tsx
+++ b/src/components/Experts/ExpertsList.tsx
@@ -10,13 +10,12 @@ import { Link, useRouter } from '../../navigation';
import { ExpertsData, Filter, GeneralFilter } from '../../types/experts';
import { getObjectByFilter, getObjectByAdditionalFilter } from '../../utils/filter';
import { getExpertsList } from '../../actions/experts';
-import { CustomPagination, CustomSpin } from '../view';
+import { CustomPagination } from '../view/CustomPagination';
+import { CustomSpin } from '../view/CustomSpin';
+import { i18nText } from '../../i18nKeys';
type ExpertListProps = {
data?: ExpertsData;
- priceTitle: string;
- durationTitle: string;
- detailButton: string;
locale: string;
baseFilter: Filter;
pageSize: number;
@@ -25,9 +24,6 @@ type ExpertListProps = {
export const ExpertsList = ({
data,
- priceTitle,
- durationTitle,
- detailButton,
locale,
baseFilter,
pageSize,
@@ -35,7 +31,8 @@ export const ExpertsList = ({
}: ExpertListProps) => {
const searchParams = useSearchParams();
const router = useRouter();
- const getTitle = (str: string, value?: any): string => (value ? str.replace('0', value) : str);
+ const getDuration = (value?: any): string => `${value || 0}${locale === 'ru' ? 'мин' : 'min'}`;
+ const getPrice = (value?: any): string => `${value || 0}€`;
const [experts, setExperts] = useState
();
const [loading, setLoading] = useState(true);
@@ -105,7 +102,7 @@ export const ExpertsList = ({
{`${item.name} ${item?.surname || ''}`}
- {getTitle(priceTitle, item?.sessionCost)} / {getTitle(durationTitle, item?.sessionDuration)}
+ {getPrice(item?.sessionCost)} / {getDuration(item?.sessionDuration)}
@@ -134,7 +131,7 @@ export const ExpertsList = ({
{item?.description}
- {detailButton}
+ {i18nText('details', locale)}
diff --git a/src/components/Experts/Filter.tsx b/src/components/Experts/Filter.tsx
index 4dc9cc5..8a623b7 100644
--- a/src/components/Experts/Filter.tsx
+++ b/src/components/Experts/Filter.tsx
@@ -8,7 +8,10 @@ import { useRouter } from '../../navigation';
import { Filter } from '../../types/experts';
import { Languages, SearchData, Tag } from '../../types/tags';
import { getObjectByFilter, getObjectByAdditionalFilter } from '../../utils/filter';
-import { CustomSwitch, CustomSlider, CustomInput } from '../view';
+import { CustomSwitch } from '../view/CustomSwitch';
+import { CustomSlider } from '../view/CustomSlider';
+import { CustomInput } from '../view/CustomInput';
+import { i18nText } from '../../i18nKeys';
type ExpertsFilterProps = {
searchData?: SearchData;
@@ -16,7 +19,7 @@ type ExpertsFilterProps = {
basePath: string;
priceTitle: string;
durationTitle: string;
- buttonApply: string;
+ locale: string;
};
export const ExpertsFilter = ({
@@ -25,7 +28,7 @@ export const ExpertsFilter = ({
basePath,
priceTitle,
durationTitle,
- buttonApply
+ locale
}: ExpertsFilterProps) => {
const searchParams = useSearchParams();
const router = useRouter();
@@ -161,7 +164,9 @@ export const ExpertsFilter = ({
const getLangList = () => {
const reg = searchLang ? new RegExp(searchLang, 'ig') : '';
const langList = reg ? (languages || []).filter(({ code, nativeSpelling }) => reg.test(code) || reg.test(nativeSpelling)) : languages;
- return langList?.length && getList('userLanguages', langList.map(({ code, nativeSpelling }) => ({ id: code, name: nativeSpelling })))
+ return langList?.length
+ ? getList('userLanguages', langList.map(({ code, nativeSpelling }) => ({ id: code, name: nativeSpelling })))
+ : null;
};
const getTagsList = () => {
@@ -185,7 +190,7 @@ export const ExpertsFilter = ({
key: 'userLanguages',
label: (
<>
-
Session Language
+
{i18nText('sessionLang', locale)}
{!openedTabs.includes('userLanguages') && filter?.userLanguages?.length > 0 && (
{getSelectedLanguage()}
)}
@@ -194,7 +199,7 @@ export const ExpertsFilter = ({
children: (
<>
setSearchLang(e.target?.value)}
allowClear
@@ -218,7 +223,7 @@ export const ExpertsFilter = ({
children: (
<>
setSearchTags(e.target?.value)}
allowClear
@@ -246,7 +251,7 @@ export const ExpertsFilter = ({
onChange={onChangeTab}
/>
-
Price
+
{i18nText('price', locale)}
{priceTitle}
-
Duration
+
{i18nText('duration', locale)}
- {buttonApply}
+ {i18nText('apply', locale)}
);
diff --git a/src/components/Modals/authModalContent/EnterContent.tsx b/src/components/Modals/authModalContent/EnterContent.tsx
index e1cbeae..b286b61 100644
--- a/src/components/Modals/authModalContent/EnterContent.tsx
+++ b/src/components/Modals/authModalContent/EnterContent.tsx
@@ -4,7 +4,11 @@ import Image from 'next/image';
import { AUTH_USER } from '../../../constants/common';
import { getAuth } from '../../../actions/auth';
import { getPersonalData } from '../../../actions/profile';
-import { CustomInput, CustomInputPassword, FilledButton, OutlinedButton, LinkButton } from '../../view';
+import { CustomInput } from '../../view/CustomInput';
+import { CustomInputPassword } from '../../view/CustomInputPassword';
+import { FilledButton } from '../../view/FilledButton';
+import { OutlinedButton } from '../../view/OutlinedButton';
+import { LinkButton } from '../../view/LinkButton';
type EnterProps = {
form: FormInstance;
diff --git a/src/components/Modals/authModalContent/FinishContent.tsx b/src/components/Modals/authModalContent/FinishContent.tsx
index 437b438..a1fd342 100644
--- a/src/components/Modals/authModalContent/FinishContent.tsx
+++ b/src/components/Modals/authModalContent/FinishContent.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { FilledButton } from '../../view';
+import { FilledButton } from '../../view/FilledButton';
export const FinishContent = () => (
<>
diff --git a/src/components/Modals/authModalContent/RegisterContent.tsx b/src/components/Modals/authModalContent/RegisterContent.tsx
index 723ac2c..fafee2e 100644
--- a/src/components/Modals/authModalContent/RegisterContent.tsx
+++ b/src/components/Modals/authModalContent/RegisterContent.tsx
@@ -3,7 +3,10 @@ import { Form, FormInstance, notification } from 'antd';
import { AUTH_USER } from '../../../constants/common';
import { getRegister } from '../../../actions/auth';
import { setPersonData } from '../../../actions/profile';
-import { CustomInput, CustomInputPassword, FilledButton, OutlinedButton } from '../../view';
+import { CustomInput } from '../../view/CustomInput';
+import { CustomInputPassword } from '../../view/CustomInputPassword';
+import { FilledButton } from '../../view/FilledButton';
+import { OutlinedButton } from '../../view/OutlinedButton';
type RegisterProps = {
form: FormInstance;
diff --git a/src/components/Modals/authModalContent/ResetContent.tsx b/src/components/Modals/authModalContent/ResetContent.tsx
index 4dfb0ae..1f55ddc 100644
--- a/src/components/Modals/authModalContent/ResetContent.tsx
+++ b/src/components/Modals/authModalContent/ResetContent.tsx
@@ -1,6 +1,8 @@
import React, { FC } from 'react';
import { Form, FormInstance } from 'antd';
-import { CustomInput, FilledButton, LinkButton } from '../../view';
+import { CustomInput } from '../../view/CustomInput';
+import { FilledButton } from '../../view/FilledButton';
+import { LinkButton } from '../../view/LinkButton';
type ResetProps = {
form: FormInstance;
diff --git a/src/components/Page/Footer/index.tsx b/src/components/Page/Footer/index.tsx
index f1b53f0..cd1c99a 100644
--- a/src/components/Page/Footer/index.tsx
+++ b/src/components/Page/Footer/index.tsx
@@ -2,8 +2,9 @@ import React from 'react';
import Link from 'next/link';
import { useTranslations } from 'next-intl';
import { Link as IntlLink } from '../../../navigation';
+import { i18nText } from '../../../i18nKeys';
-export const Footer = () => {
+export const Footer = ({ locale }: { locale: string }) => {
const t = useTranslations('Footer');
return (
@@ -11,22 +12,22 @@ export const Footer = () => {
@@ -35,19 +36,23 @@ export const Footer = () => {
- {t('menu.faq')}
- {t(`menu.privacy-policy`)}
+
+ {i18nText('footer.faq', locale)}
+
+
+ {i18nText('footer.policy', locale)}
+
diff --git a/src/components/Page/Header/HeaderAuthLinks.tsx b/src/components/Page/Header/HeaderAuthLinks.tsx
index 1118ef3..c272738 100644
--- a/src/components/Page/Header/HeaderAuthLinks.tsx
+++ b/src/components/Page/Header/HeaderAuthLinks.tsx
@@ -1,35 +1,21 @@
-'use client';
+'use client'
import React, { FC, useState, useEffect } from 'react';
import { Button } from 'antd';
import { useSelectedLayoutSegment } from 'next/navigation';
-import { styled } from 'styled-components';
import { Link } from '../../../navigation';
import { AUTH_TOKEN_KEY } from '../../../constants/common';
import { useLocalStorage } from '../../../hooks/useLocalStorage';
import { AuthModal } from '../../Modals/AuthModal';
+import { i18nText } from '../../../i18nKeys';
type HeaderAuthLinksProps = {
- enterTitle: string;
- registerTitle: string;
- accountTitle: string;
+ locale: string;
separatorClass?: string;
};
-const LinkButton = styled(Button)`
- color: #66A5AD !important;
- font-size: 16px !important;
- height: auto !important;
- padding: 0 !important;
- font-style: normal !important;
- font-weight: 600 !important;
- line-height: normal !important;
-`;
-
export const HeaderAuthLinks: FC
= ({
- enterTitle,
- registerTitle,
- accountTitle,
+ locale,
separatorClass = 'b-header__nav__list__line'
}) => {
const [isOpenModal, setIsOpenModal] = useState(false);
@@ -52,29 +38,33 @@ export const HeaderAuthLinks: FC = ({
return token
? (
- {accountTitle}
+
+ {i18nText('account', locale)}
+
)
: (
<>
- onOpen('register')}
>
- {registerTitle}
-
+ {i18nText('registration', locale)}
+
|
- onOpen('enter')}
>
- {enterTitle}
-
+ {i18nText('enter', locale)}
+
{
const selectedLayoutSegment = useSelectedLayoutSegment();
@@ -24,13 +20,13 @@ export const HeaderMenu = ({
return (
diff --git a/src/components/Page/Header/HeaderMobileMenu.tsx b/src/components/Page/Header/HeaderMobileMenu.tsx
index e69d060..cd888f9 100644
--- a/src/components/Page/Header/HeaderMobileMenu.tsx
+++ b/src/components/Page/Header/HeaderMobileMenu.tsx
@@ -6,17 +6,13 @@ import { HeaderAuthLinks } from './HeaderAuthLinks';
import { Link } from '../../../navigation';
type HeaderMenuMobileProps = {
+ locale: string;
linkConfig: { path: string, title: string }[];
- enterTitle: string;
- registerTitle: string;
- accountTitle: string;
};
export const HeaderMobileMenu: FC = ({
- linkConfig,
- enterTitle,
- registerTitle,
- accountTitle
+ locale,
+ linkConfig
}) => {
const [showMobileMenu, setShowMobileMenu] = useState(false);
const selectedLayoutSegment = useSelectedLayoutSegment();
@@ -41,9 +37,7 @@ export const HeaderMobileMenu: FC = ({
diff --git a/src/components/Page/Header/index.tsx b/src/components/Page/Header/index.tsx
index 80497ab..0985d7f 100644
--- a/src/components/Page/Header/index.tsx
+++ b/src/components/Page/Header/index.tsx
@@ -1,21 +1,19 @@
-import React, { FC } from 'react';
-import { useTranslations } from 'next-intl';
+import React, { FC, Suspense } from 'react';
import { HeaderMenu } from './HeaderMenu';
import { LanguageSwitcher } from './LanguageSwitcher';
import { HeaderMobileMenu } from './HeaderMobileMenu';
import { HEAD_ROUTES } from '../../../constants/routes';
import { Link } from '../../../navigation';
+import { i18nText } from '../../../i18nKeys';
type HeaderProps = {
locale: string;
};
export const Header: FC
= ({ locale }) => {
- const t = useTranslations('Header');
-
const routes: { path: string, title: string }[] = HEAD_ROUTES.map((item) => ({
path: item,
- title: t(`menu.${item}`)
+ title: i18nText(`menu.${item}`, locale)
}));
return (
@@ -29,21 +27,21 @@ export const Header: FC = ({ locale }) => {
alt=""
/>
-
-
+
+
+
+
-
+
+
+
>
);
};
diff --git a/src/components/view/CustomInput.tsx b/src/components/view/CustomInput.tsx
index c06a98a..c468940 100644
--- a/src/components/view/CustomInput.tsx
+++ b/src/components/view/CustomInput.tsx
@@ -1,34 +1,4 @@
import React from 'react';
-import styled from 'styled-components';
-import { Input as AntdInput } from 'antd';
+import { Input } from 'antd';
-const Input = styled(AntdInput)`
- padding: 15px 16px !important;
- background: #F8F8F7 !important;
- border: 1px solid #F8F8F7 !important;
- border-radius: 8px !important;
- color: #000 !important;
- align-items: center;
-
- input {
- background-color: transparent !important;
- }
-
- &:focus, &:hover, &:focus-within {
- border-color: #66A5AD !important;
- box-shadow: none !important;
- }
-
- &::placeholder {
- color: #000 !important;
- opacity: .4 !important;
- }
-
- &.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless) {
- border-color: #ff4d4f !important;
- }
-`;
-
-export const CustomInput = (props: any) => (
-
-);
+export const CustomInput = (props: any) =>
;
diff --git a/src/components/view/CustomInputPassword.tsx b/src/components/view/CustomInputPassword.tsx
index fca2637..203208e 100644
--- a/src/components/view/CustomInputPassword.tsx
+++ b/src/components/view/CustomInputPassword.tsx
@@ -1,37 +1,10 @@
import React from 'react';
-import styled from 'styled-components';
-import { Input as AntdInput } from 'antd';
+import { Input } from 'antd';
import { EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons';
-const Input = styled(AntdInput.Password)`
- padding: 15px 16px !important;
- background: #F8F8F7 !important;
- border: 1px solid #F8F8F7 !important;
- border-radius: 8px !important;
- color: #000 !important;
- box-shadow: none !important;
-
- input {
- background: transparent !important;
- }
-
- &:focus, &:hover, &.ant-input-affix-wrapper-focused {
- border-color: #66A5AD !important;
- box-shadow: none !important;
- }
-
- input::placeholder {
- color: #000 !important;
- opacity: .4 !important;
- }
-
- &.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless) {
- border-color: #ff4d4f !important;
- }
-`;
-
export const CustomInputPassword = (props: any) => (
-
(visible
?
:
diff --git a/src/components/view/CustomMultiSelect.tsx b/src/components/view/CustomMultiSelect.tsx
index 501e1d0..1ea80ef 100644
--- a/src/components/view/CustomMultiSelect.tsx
+++ b/src/components/view/CustomMultiSelect.tsx
@@ -1,71 +1,11 @@
+'use client'
+
import React, {useEffect, useState} from 'react';
-import styled from 'styled-components';
-import { Select as AntdSelect, Tag } from 'antd';
+import { Select, Tag } from 'antd';
import type { SelectProps } from 'antd';
type TagRender = SelectProps['tagRender'];
-const Select = styled(AntdSelect)`
- width: 100% !important;
- height: 54px !important;
-
- .ant-select-selector {
- background-color: #F8F8F7 !important;
- border-color: #F8F8F7 !important;
- border-radius: 8px !important;
- padding: 22px 16px 8px !important;
- box-shadow: none !important;
-
- .ant-select-selection-item {
- font-size: 15px !important;
- font-weight: 400 !important;
- line-height: 24px !important;
- color: #313131 !important;
- }
- }
-
- .ant-select-selection-overflow-item {
- margin-right: 4px;
- }
-
- .ant-select-arrow {
- color: #2c7873 !important;
- }
-
- &.ant-select-focused, &:hover {
- .ant-select-selector {
- border-color: #2c7873 !important;
- box-shadow: none !important;
- }
- }
-`;
-
-const SelectWrap = styled.div`
- position: relative;
- width: 100%;
-`;
-
-const SelectLabel = styled.div`
- font-size: 15px;
- font-style: normal;
- font-weight: 400;
- line-height: 24px;
- color: #000;
- opacity: .3;
- position: absolute;
- left: 16px;
- top: 15px;
- z-index: 1;
- transition: all .1s ease;
-
- .b-multiselect__active & {
- font-size: 12px;
- font-weight: 300;
- line-height: 14px;
- top: 8px;
- }
-`;
-
const tagRender: TagRender = (props) => {
const { label } = props;
@@ -89,9 +29,10 @@ export const CustomMultiSelect = (props: any) => {
}, [value]);
return (
-
- {label}
+
+
{label}
);
};
diff --git a/src/components/view/CustomPagination.tsx b/src/components/view/CustomPagination.tsx
index 83b7a78..9ccb6f1 100644
--- a/src/components/view/CustomPagination.tsx
+++ b/src/components/view/CustomPagination.tsx
@@ -1,49 +1,5 @@
-'use client';
-
import React from 'react';
-import styled from 'styled-components';
-import { Pagination as AntdPagination, PaginationProps } from 'antd';
-
-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-jump-next {
- margin-inline-end: 0 !important;
- height: 40px !important;
- width: 40px !important;
- line-height: 38px !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;
- }
-`;
+import { Pagination, PaginationProps } from 'antd';
const itemRender: PaginationProps['itemRender'] = (_, type, originalElement) => {
if (type === 'prev' || type === 'next') {
@@ -55,6 +11,7 @@ const itemRender: PaginationProps['itemRender'] = (_, type, originalElement) =>
export const CustomPagination = (props: PaginationProps) => (
(
-
-);
+export const CustomRate = (props: any) => ;
diff --git a/src/components/view/CustomSelect.tsx b/src/components/view/CustomSelect.tsx
index 936bcfc..5afd657 100644
--- a/src/components/view/CustomSelect.tsx
+++ b/src/components/view/CustomSelect.tsx
@@ -1,63 +1,7 @@
+'use client'
+
import React, { useEffect, useState } from 'react';
-import styled from 'styled-components';
-import { Select as AntdSelect} from 'antd';
-
-const Select = styled(AntdSelect)`
- width: 100% !important;
- height: 54px !important;
-
- .ant-select-selector {
- background-color: #F8F8F7 !important;
- border-color: #F8F8F7 !important;
- border-radius: 8px !important;
- padding: 22px 16px 8px !important;
- box-shadow: none !important;
-
- .ant-select-selection-item {
- font-size: 15px !important;
- font-weight: 400 !important;
- line-height: 24px !important;
- color: #313131 !important;
- }
- }
-
- .ant-select-arrow {
- color: #2c7873 !important;
- }
-
- &.ant-select-focused, &:hover {
- .ant-select-selector {
- border-color: #2c7873 !important;
- box-shadow: none !important;
- }
- }
-`;
-
-const SelectWrap = styled.div`
- position: relative;
- width: 100%;
-`;
-
-const SelectLabel = styled.div`
- font-size: 15px;
- font-style: normal;
- font-weight: 400;
- line-height: 24px;
- color: #000;
- opacity: .3;
- position: absolute;
- left: 16px;
- top: 15px;
- z-index: 1;
- transition: all .1s ease;
-
- .b-select__active & {
- font-size: 12px;
- font-weight: 300;
- line-height: 14px;
- top: 8px;
- }
-`;
+import { Select } from 'antd';
export const CustomSelect = (props: any) => {
const { label, value, ...other } = props;
@@ -72,14 +16,15 @@ export const CustomSelect = (props: any) => {
}, [value]);
return (
-
- {label}
+
+
{label}
);
};
diff --git a/src/components/view/CustomSlider.tsx b/src/components/view/CustomSlider.tsx
index 2326fc5..54120cd 100644
--- a/src/components/view/CustomSlider.tsx
+++ b/src/components/view/CustomSlider.tsx
@@ -1,49 +1,4 @@
-'use client';
-
import React from 'react';
-import styled from 'styled-components';
-import { Slider as AntdSlider } from 'antd';
+import { Slider } 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 12px rgba(102, 165, 173, .2) !important;
- }
- }
- }
-`;
-
-export const CustomSlider = (props: any) => (
-
-);
+export const CustomSlider = (props: any) => ;
diff --git a/src/components/view/CustomSpin.tsx b/src/components/view/CustomSpin.tsx
index 844c7c6..7de87ba 100644
--- a/src/components/view/CustomSpin.tsx
+++ b/src/components/view/CustomSpin.tsx
@@ -1,12 +1,4 @@
import React from 'react';
-import { Spin as AntdSpin } from 'antd';
-import { styled } from 'styled-components';
+import { Spin } from 'antd';
-const Spin = styled(AntdSpin)`
- width: 100%;
- margin: 24px 0;
-`;
-
-export const CustomSpin = (props: any) => (
-
-);
+export const CustomSpin = (props: any) => ;
diff --git a/src/components/view/CustomSwitch.tsx b/src/components/view/CustomSwitch.tsx
index ad15b9a..fb44f32 100644
--- a/src/components/view/CustomSwitch.tsx
+++ b/src/components/view/CustomSwitch.tsx
@@ -1,34 +1,4 @@
-'use client';
-
import React from 'react';
-import styled from 'styled-components';
-import { Switch as AntdSwitch } from 'antd';
+import { Switch } 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) => (
-
-);
+export const CustomSwitch = (props: any) => ;
diff --git a/src/components/view/FilledButton.tsx b/src/components/view/FilledButton.tsx
index 02488de..f289d20 100644
--- a/src/components/view/FilledButton.tsx
+++ b/src/components/view/FilledButton.tsx
@@ -1,17 +1,8 @@
import React from 'react';
-import { styled } from 'styled-components';
-import { Button as AntdButton } from 'antd';
-
-const Button = styled(AntdButton)`
- background: #66A5AD !important;
- font-size: 15px !important;
- border-radius: 8px !important;
- height: 54px !important;
- box-shadow: 0px 2px 4px 0px rgba(102, 165, 173, 0.32) !important;
-`;
+import { Button } from 'antd';
export const FilledButton = (props: any) => (
-