Skip to content

Commit

Permalink
fix: localisation issue with account switcher tabs by passing label p…
Browse files Browse the repository at this point in the history
…rops
  • Loading branch information
farabi-deriv committed Oct 11, 2024
1 parent 78ed22d commit 1213b62
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/components/AppLayout/AccountSwitcher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,18 @@ type AccountSwitcherProps = {
buttonClassName?: string;
children?: ReactElement<TabTitleProps>[];
isDisabled?: boolean;
tabsLabels: {
demo: string;
real: string;
};
};

export const AccountSwitcher = ({
children,
activeAccount,
isDisabled = false,
buttonClassName,
tabsLabels,
}: AccountSwitcherProps) => {
const [isOpen, setIsOpen] = useState(false);
const ref = useRef(null);
Expand Down Expand Up @@ -87,8 +92,8 @@ export const AccountSwitcher = ({
<Tabs
activeTab={
activeAccount.isVirtual
? "Demo"
: "Real"
? tabsLabels.demo
: tabsLabels.real
}
variant="secondary"
>
Expand All @@ -110,8 +115,8 @@ export const AccountSwitcher = ({
<Tabs
activeTab={
activeAccount.isVirtual
? "Demo"
: "Real"
? tabsLabels.demo
: tabsLabels.real
}
variant="secondary"
>
Expand Down

0 comments on commit 1213b62

Please sign in to comment.