From 5f7662a60c3e1b591fa2545691d02cfc2ca51dd4 Mon Sep 17 00:00:00 2001 From: Jaco Date: Tue, 12 Apr 2022 08:48:06 +0200 Subject: [PATCH] Consolidate *--hidden classes (#7359) * Consolidate *--hidden classes * Additional --- packages/apps/src/Apps.tsx | 4 ++++ packages/page-council/src/index.tsx | 9 ++------- packages/page-parachains/src/index.tsx | 11 +++-------- packages/page-staking/src/Actions/Account/index.tsx | 6 +----- packages/page-staking/src/Overview/Summary.tsx | 2 +- packages/page-staking/src/Overview/index.tsx | 4 ++-- packages/page-staking/src/index.tsx | 8 ++------ 7 files changed, 15 insertions(+), 29 deletions(-) diff --git a/packages/apps/src/Apps.tsx b/packages/apps/src/Apps.tsx index 3a977fa1a7..033d5168fc 100644 --- a/packages/apps/src/Apps.tsx +++ b/packages/apps/src/Apps.tsx @@ -54,4 +54,8 @@ export default React.memo(styled(Apps)` display: flex; flex-direction: column; min-height: 100vh; + + .--hidden { + display: none; + } `); diff --git a/packages/page-council/src/index.tsx b/packages/page-council/src/index.tsx index d110aa6237..88874119a8 100644 --- a/packages/page-council/src/index.tsx +++ b/packages/page-council/src/index.tsx @@ -7,7 +7,6 @@ import type { AccountId } from '@polkadot/types/interfaces'; import React, { useMemo } from 'react'; import { Route, Switch } from 'react-router'; import { useLocation } from 'react-router-dom'; -import styled from 'styled-components'; import { Tabs } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; @@ -60,15 +59,11 @@ function CouncilApp ({ basePath, className }: Props): React.ReactElement ); } -export default React.memo(styled(CouncilApp)` - .council--hidden { - display: none; - } -`); +export default React.memo(CouncilApp); diff --git a/packages/page-parachains/src/index.tsx b/packages/page-parachains/src/index.tsx index 2481dc28c2..c3041e221c 100644 --- a/packages/page-parachains/src/index.tsx +++ b/packages/page-parachains/src/index.tsx @@ -8,7 +8,6 @@ import type { ParaId } from '@polkadot/types/interfaces'; import React, { useRef } from 'react'; import { Route, Switch } from 'react-router'; import { useLocation } from 'react-router-dom'; -import styled from 'styled-components'; import { Tabs } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; @@ -100,7 +99,7 @@ function ParachainsApp ({ basePath, className }: Props): React.ReactElement )} - + {isSelectable && controllerId && ( +
('validators')}> {stakingOverview diff --git a/packages/page-staking/src/Overview/index.tsx b/packages/page-staking/src/Overview/index.tsx index 8160c88bb2..26bc62965f 100644 --- a/packages/page-staking/src/Overview/index.tsx +++ b/packages/page-staking/src/Overview/index.tsx @@ -77,7 +77,7 @@ function Overview ({ className = '', favorites, hasQueries, minCommission, nomin /> {intentIndex === 1 && ( )} ` - .staking--hidden { - display: none; - } - .staking--Chart { margin-top: 1.5rem;