Skip to content

Commit

Permalink
Merge pull request #83 from farabi-deriv/farabi/bot-2283/fix-react-to…
Browse files Browse the repository at this point in the history
…astify

Farabi/bot-2283/fix-react-toastify
  • Loading branch information
shafin-deriv authored Oct 14, 2024
2 parents feb7a52 + 93b8066 commit 22e5d7e
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 23 deletions.
1 change: 1 addition & 0 deletions src/app/app-content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import BotBuilder from '../pages/bot-builder';
import Main from '../pages/main';
import './app.scss';
import 'react-toastify/dist/ReactToastify.css';
import '../components/bot-notification/bot-notification.scss';

const AppContent = () => {
const { localize } = useTranslations();
Expand Down
6 changes: 5 additions & 1 deletion src/components/layout/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ const Footer = () => {
isModalOpen
languages={LANGUAGES}
onClose={hideModal}
onLanguageSwitch={code => switchLanguage(code)}
onLanguageSwitch={code => {
switchLanguage(code);
hideModal();
window.location.reload();
}}
selectedLanguage={currentLang}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
@use 'components/shared/styles/mixins' as *;

.notifications__wrapper {
padding-inline-start: 0.5rem;
border-inline-start: 1px solid var(--general-section-1);
border-width: 1px;
margin-inline-end: 1rem;
margin-inline-end: 2.4rem;

@include mobile-screen {
margin-inline-end: 0;
}

&--desktop {
z-index: 10;
Expand Down
11 changes: 3 additions & 8 deletions src/components/layout/header/header.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
@use 'components/shared/styles/constants' as *;
@use 'components/shared/styles/mixins' as *;

.app-header {
padding-inline-end: 20px;

&__account-settings {
padding-inline-end: 0.75rem;
border-inline-end: 0.1rem solid var(--general-section-1);
Expand Down Expand Up @@ -42,8 +41,8 @@
}

.deriv-account-switcher {
&__button {
margin: 0 1.6rem 0 1.7rem;
&__balance {
padding: 0 1rem 0.1rem 0;
}

&__list {
Expand Down Expand Up @@ -113,9 +112,5 @@
button {
font-weight: 400;
margin-right: 1.6rem;

&:last-child {
margin-right: 0;
}
}
}
24 changes: 12 additions & 12 deletions src/components/layout/header/header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import clsx from 'clsx';
import Button from '@/components/shared_ui/button';
import Text from '@/components/shared_ui/text';
import useActiveAccount from '@/hooks/api/account/useActiveAccount';
import { StandaloneCircleUserRegularIcon } from '@deriv/quill-icons/Standalone';
import { useAuthData } from '@deriv-com/api-hooks';
Expand Down Expand Up @@ -45,30 +44,31 @@ const AppHeader = () => {
</Tooltip>
)}
<AccountSwitcher activeAccount={activeAccount} />
<Button
onClick={() => {
window.location.assign('https://app.deriv.com/cashier/deposit');
}}
className='deposit-button'
>
<Text size='s' weight='bold'>
{localize('Deposit')}
</Text>
</Button>
{isDesktop && (
<Button
onClick={() => {
window.location.assign('https://app.deriv.com/cashier/deposit');
}}
className='deposit-button'
>
<Button primary>{localize('Deposit')}</Button>
</Button>
)}
</>
);
} else {
return (
<div className='auth-actions'>
<Button
color='primary-light'
tertiary
onClick={() => {
window.location.assign(getOauthURL());
}}
>
<Localize i18n_default_text='Log in' />
</Button>
<Button
primary
onClick={() => {
window.location.assign(getOauthURL());
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const PlatformSwitcher = () => {
<UIPlatformSwitcher
bottomLinkLabel={localize('Looking for CFDs? Go to Trader’s Hub')}
buttonProps={{
icon: platformsConfig[0].buttonIcon,
icon: platformsConfig[1].buttonIcon,
}}
>
{platformsConfig.map(({ active, description, href, icon }) => (
Expand Down

0 comments on commit 22e5d7e

Please sign in to comment.