Skip to content

Commit

Permalink
fix: add subvariant deposit key
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Aug 14, 2024
1 parent f6fdb78 commit abe9ba0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/widget/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"bookmarkedWallets": "Bookmarked wallets",
"bridge": "Bridge",
"checkout": "Checkout",
"deposit": "Deposit",
"exchange": "Exchange",
"from": "Exchange from",
"gas": "Gas",
Expand Down
5 changes: 3 additions & 2 deletions packages/widget/src/pages/MainPage/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ import { ReviewButton } from './ReviewButton.js';
export const MainPage: React.FC = () => {
const { t } = useTranslation();
const wideVariant = useWideVariant();
const { subvariant, contractComponent, hiddenUI } = useWidgetConfig();
const { subvariant, subvariantOptions, contractComponent, hiddenUI } =
useWidgetConfig();
const custom = subvariant === 'custom';
const showPoweredBy = !hiddenUI?.includes(HiddenUI.PoweredBy);

const title =
subvariant === 'custom'
? t(`header.checkout`)
? t(`header.${subvariantOptions?.custom ?? 'checkout'}`)
: subvariant === 'refuel'
? t(`header.gas`)
: t(`header.exchange`);
Expand Down

0 comments on commit abe9ba0

Please sign in to comment.