{isChatLoading ? (
) : (
diff --git a/src/routes/AppContent/index.scss b/src/routes/AppContent/index.scss
index a1375fae..183410db 100644
--- a/src/routes/AppContent/index.scss
+++ b/src/routes/AppContent/index.scss
@@ -1,17 +1,19 @@
.app-content {
- overflow: hidden;
- height: calc(100vh - 10rem);
+ &__body {
+ overflow: hidden;
+ height: calc(100vh - 10rem);
- @include desktop {
- max-width: 952px;
- min-width: 672px;
- margin: 2rem auto;
- margin-bottom: 0;
- }
+ @include desktop {
+ max-width: 952px;
+ min-width: 672px;
+ margin: 2rem auto 0;
+ margin-bottom: 0;
+ }
- @include mobile {
- width: 100vw;
- height: 100vh;
+ @include mobile {
+ width: 100vw;
+ height: 100vh;
+ }
}
&__tabs {
@@ -29,4 +31,8 @@
}
}
}
+
+ &__title {
+ border-bottom: 1px solid #f2f3f4;
+ }
}
diff --git a/src/routes/AppContent/index.tsx b/src/routes/AppContent/index.tsx
index 01ecc539..d98b4c34 100644
--- a/src/routes/AppContent/index.tsx
+++ b/src/routes/AppContent/index.tsx
@@ -4,7 +4,7 @@ import { BUY_SELL_URL } from '@/constants';
import { api } from '@/hooks';
import { AdvertiserInfoStateProvider } from '@/providers/AdvertiserInfoStateProvider';
import { getCurrentRoute } from '@/utils';
-import { Loader, Tab, Tabs } from '@deriv-com/ui';
+import { Loader, Tab, Tabs, Text, useDevice } from '@deriv-com/ui';
import Router from '../Router';
import { routes } from '../routes-config';
import './index.scss';
@@ -16,6 +16,7 @@ const tabRoutesConfiguration = routes.filter(
const AppContent = () => {
const history = useHistory();
const location = useLocation();
+ const { isDesktop } = useDevice();
const { data: activeAccountData, isLoading: isLoadingActiveAccount } = api.account.useActiveAccount();
const getActiveTab = (pathname: string) => {
@@ -70,10 +71,19 @@ const AppContent = () => {
}}
>
+
+ Deriv P2P
+
{(isLoadingActiveAccount || !activeAccountData) && !isEndpointRoute ? (
) : (
- <>
+
{
))}
- >
+
)}
diff --git a/src/utils/tabs.ts b/src/utils/tabs.ts
new file mode 100644
index 00000000..64fe83ed
--- /dev/null
+++ b/src/utils/tabs.ts
@@ -0,0 +1,16 @@
+import { TLocalize } from 'types';
+
+/**
+ * The below function is a temporary solution to get handle the tab switching when switching the language.
+ * @returns the localized tabs based on the current language.
+ */
+export const getLocalizedTabs = (localize: TLocalize): { [tab: string]: string } => ({
+ 'Active orders': localize('Active orders'),
+ 'Ad details': localize('Ad details'),
+ Buy: localize('Buy'),
+ 'My counterparties': localize('My counterparties'),
+ 'Past orders': localize('Past orders'),
+ 'Payment methods': localize('Payment methods'),
+ Sell: localize('Sell'),
+ Stats: localize('Stats'),
+});