Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into P2PS-2596
Browse files Browse the repository at this point in the history
  • Loading branch information
usman-deriv committed Aug 1, 2024
2 parents b082c01 + 6cea6b9 commit 5a9f377
Show file tree
Hide file tree
Showing 56 changed files with 378 additions and 177 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
height="0"
width="0"
style="display: none; visibility: hidden"
title="Google Tag Manager"
></iframe
></noscript>
<!-- End Google Tag Manager (noscript) -->
Expand Down
263 changes: 230 additions & 33 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"analyze:build": "vite-bundle-visualizer",
"dev": "vite",
"build": "tsc && vite build",
"fix": "eslint \"./src/**/*.?(js|jsx|ts|tsx)\" --fix",
Expand All @@ -17,13 +18,12 @@
"@babel/preset-env": "^7.24.5",
"@chakra-ui/react": "^2.8.2",
"@deriv-com/analytics": "^1.10.1",
"@deriv-com/api-hooks": "^1.3.7",
"@deriv-com/api-hooks": "^1.4.5",
"@deriv-com/translations": "^1.2.4",
"@deriv-com/ui": "^1.29.0",
"@deriv-com/utils": "^0.0.28",
"@deriv/quill-icons": "^1.22.10",
"@deriv/quill-icons": "^1.23.8",
"@sendbird/chat": "^4.11.3",
"@svgr/rollup": "^8.1.0",
"@tanstack/react-query": "^5.28.14",
"@tanstack/react-table": "^8.15.0",
"@vitejs/plugin-react": "^4.2.1",
Expand All @@ -49,7 +49,6 @@
"use-query-params": "^2.2.1",
"usehooks-ts": "^2.16.0",
"vite": "^5.1.4",
"vite-plugin-svgr": "^4.2.0",
"zustand": "^4.5.2"
},
"devDependencies": {
Expand All @@ -67,6 +66,7 @@
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@deriv-com/eslint-config-deriv": "^2.1.0-beta.3",
"@svgr/rollup": "^8.1.0",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
Expand Down Expand Up @@ -105,7 +105,9 @@
"tailwindcss": "^3.3.5",
"ts-jest": "^29.1.2",
"typescript": "^5.2.2",
"vite-bundle-visualizer": "^1.2.1",
"vite-plugin-html-config": "^1.0.11",
"vite-plugin-sass": "^0.1.0"
"vite-plugin-sass": "^0.1.0",
"vite-plugin-svgr": "^4.2.0"
}
}
Binary file removed src/assets/404.png
Binary file not shown.
2 changes: 0 additions & 2 deletions src/assets/blog.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/find-ad.svg

This file was deleted.

9 changes: 0 additions & 9 deletions src/assets/introducing-deriv-p2p.svg

This file was deleted.

11 changes: 0 additions & 11 deletions src/assets/p2p-unavailable.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/pay-user.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/receive-payment.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/received-fund.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/release-fund.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/scam-advance-payment.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/scam-pot.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/scam-sms.svg

This file was deleted.

9 changes: 0 additions & 9 deletions src/assets/use-deriv-p2p.svg

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/AdvertsTableRow/AdvertsTableRow.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.adverts-table-row {
width: 100%;
display: grid;
grid-template-columns: 2fr 1.4fr 1.4fr 2.4fr 0.8fr;
grid-template-columns: 2fr 1.4fr 1.4fr 2.4fr auto;
padding: 1.6rem;
align-items: center;

@include mobile-or-tablet-screen {
grid-template-columns: 2fr 0.8fr;
grid-template-columns: 2fr auto;
}

&--advertiser {
Expand Down
6 changes: 4 additions & 2 deletions src/components/AppHeader/AccountSwitcher/AccountSwitcher.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { lazy } from 'react';
import { useActiveAccount } from '@/hooks/api/account';
import { CurrencyUsdIcon } from '@deriv/quill-icons';
import { AccountSwitcher as UIAccountSwitcher } from '@deriv-com/ui';
import { FormatUtils } from '@deriv-com/utils';

Expand All @@ -8,12 +8,14 @@ type TAccountSwitcherProps = {
account: TActiveAccount;
};

const CurrencyIcon = lazy(() => import('../CurrencyIcon').then(module => ({ default: module.CurrencyIcon })));

const AccountSwitcher = ({ account }: TAccountSwitcherProps) => {
const activeAccount = {
balance: FormatUtils.formatMoney(account?.balance ?? 0),
currency: account?.currency || 'USD',
currencyLabel: account?.currency || 'US Dollar',
icon: <CurrencyUsdIcon iconSize='sm' />,
icon: <CurrencyIcon currency={account?.currency} isVirtual={Boolean(account?.is_virtual)} />,
isActive: true,
isVirtual: Boolean(account?.is_virtual),
loginid: account?.loginid || '',
Expand Down
Loading

0 comments on commit 5a9f377

Please sign in to comment.