From 7754f8a0dc888e69bebb9dd7c6952128339343a2 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Fri, 16 Sep 2022 10:32:16 -0700 Subject: [PATCH] Fix buy/sell buttons palette --- frontend/src/components/HomePage.js | 6 +----- frontend/src/components/MakerPage.js | 17 +++++++++++++++-- frontend/src/components/UserGenPage.js | 6 +++--- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/HomePage.js b/frontend/src/components/HomePage.js index 950d2246..725d3ec3 100644 --- a/frontend/src/components/HomePage.js +++ b/frontend/src/components/HomePage.js @@ -1,9 +1,5 @@ import React, { Component } from 'react'; -import { - BrowserRouter as Router, - Switch, - Route, -} from 'react-router-dom'; +import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; import UserGenPage from './UserGenPage'; import MakerPage from './MakerPage'; diff --git a/frontend/src/components/MakerPage.js b/frontend/src/components/MakerPage.js index d60d4efe..5b4b559c 100644 --- a/frontend/src/components/MakerPage.js +++ b/frontend/src/components/MakerPage.js @@ -351,7 +351,13 @@ class MakerPage extends Component { }) } 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')} @@ -364,7 +370,14 @@ class MakerPage extends Component { }) } 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')} diff --git a/frontend/src/components/UserGenPage.js b/frontend/src/components/UserGenPage.js index 8c5a76c2..f264b220 100644 --- a/frontend/src/components/UserGenPage.js +++ b/frontend/src/components/UserGenPage.js @@ -98,9 +98,6 @@ class UserGenPage extends Component { earnedRewards: data.earned_rewards, lastOrderId: data.last_order_id ? data.last_order_id : null, stealthInvoices: data.wants_stealth, - tgEnabled: data.tg_enabled, - tgBotName: data.tg_bot_name, - tgToken: data.tg_token, }) : this.props.setAppState({ nickname: data.nickname, @@ -111,6 +108,9 @@ class UserGenPage extends Component { referralCode: data.referral_code, earnedRewards: data.earned_rewards, stealthInvoices: data.wants_stealth, + tgEnabled: data.tg_enabled, + tgBotName: data.tg_bot_name, + tgToken: data.tg_token, }) & writeCookie('robot_token', token) & writeCookie('pub_key', data.public_key.split('\n').join('\\')) &