Fix buy/sell buttons palette

This commit is contained in:
Reckless_Satoshi 2022-09-16 10:32:16 -07:00
parent 34a8fd99ed
commit 7754f8a0dc
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 19 additions and 10 deletions

View File

@ -1,9 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
BrowserRouter as Router,
Switch,
Route,
} from 'react-router-dom';
import UserGenPage from './UserGenPage'; import UserGenPage from './UserGenPage';
import MakerPage from './MakerPage'; import MakerPage from './MakerPage';

View File

@ -351,7 +351,13 @@ class MakerPage extends Component {
}) })
} }
disableElevation={this.props.type == 1} disableElevation={this.props.type == 1}
color={this.props.type == 1 ? 'primary' : 'inherit'} sx={{
backgroundColor: this.props.type == 1 ? 'primary.main' : 'background.paper',
color: this.props.type == 1 ? 'background.paper' : 'text.secondary',
':hover': {
color: 'background.paper',
},
}}
> >
{t('Buy')} {t('Buy')}
</Button> </Button>
@ -364,7 +370,14 @@ class MakerPage extends Component {
}) })
} }
disableElevation={this.props.type == 0} disableElevation={this.props.type == 0}
color={this.props.type == 0 ? 'secondary' : 'inherit'} color='secondary'
sx={{
backgroundColor: this.props.type == 0 ? 'secondary.main' : 'background.paper',
color: this.props.type == 0 ? 'background.secondary' : 'text.secondary',
':hover': {
color: 'background.paper',
},
}}
> >
{t('Sell')} {t('Sell')}
</Button> </Button>

View File

@ -98,9 +98,6 @@ class UserGenPage extends Component {
earnedRewards: data.earned_rewards, earnedRewards: data.earned_rewards,
lastOrderId: data.last_order_id ? data.last_order_id : null, lastOrderId: data.last_order_id ? data.last_order_id : null,
stealthInvoices: data.wants_stealth, stealthInvoices: data.wants_stealth,
tgEnabled: data.tg_enabled,
tgBotName: data.tg_bot_name,
tgToken: data.tg_token,
}) })
: this.props.setAppState({ : this.props.setAppState({
nickname: data.nickname, nickname: data.nickname,
@ -111,6 +108,9 @@ class UserGenPage extends Component {
referralCode: data.referral_code, referralCode: data.referral_code,
earnedRewards: data.earned_rewards, earnedRewards: data.earned_rewards,
stealthInvoices: data.wants_stealth, stealthInvoices: data.wants_stealth,
tgEnabled: data.tg_enabled,
tgBotName: data.tg_bot_name,
tgToken: data.tg_token,
}) & }) &
writeCookie('robot_token', token) & writeCookie('robot_token', token) &
writeCookie('pub_key', data.public_key.split('\n').join('\\')) & writeCookie('pub_key', data.public_key.split('\n').join('\\')) &