diff --git a/.eslintrc.json b/.eslintrc.json index 9f30534c6..5f9a4d8d2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,7 @@ { "root": true, "ignorePatterns": ["**/*"], - "plugins": ["@nrwl/nx", "eslint-plugin-unicorn"], + "plugins": ["@nrwl/nx", "eslint-plugin-unicorn", "jsx-a11y"], "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], @@ -33,6 +33,13 @@ "message": "Import the specific methods you need from lodash e.g. `import get from 'lodash/get'`. This helps with bundle sizing." } ], + "jsx-a11y/no-redundant-roles": [ + "error", + { + "ul": ["list"], + "ol": ["list"] + } + ], "curly": "warn" } }, diff --git a/apps/token/src/app.scss b/apps/token/src/app.scss deleted file mode 100644 index f0e2bf9ca..000000000 --- a/apps/token/src/app.scss +++ /dev/null @@ -1,14 +0,0 @@ -@import './styles/colors'; - -.app { - max-width: 1300px; - margin: 0 auto; - display: grid; - grid-template-rows: min-content 1fr min-content; - min-height: 100%; - - @media (min-width: 960px) { - border-left: 1px solid $white; - border-right: 1px solid $white; - } -} diff --git a/apps/token/src/app.tsx b/apps/token/src/app.tsx index d63d3c776..c1ebcbe04 100644 --- a/apps/token/src/app.tsx +++ b/apps/token/src/app.tsx @@ -1,5 +1,4 @@ import './i18n'; -import './app.scss'; import React from 'react'; import { BrowserRouter as Router } from 'react-router-dom'; @@ -35,7 +34,7 @@ function App() { <> -
+
diff --git a/apps/token/src/components/epoch-countdown/epoch-countdown.scss b/apps/token/src/components/epoch-countdown/epoch-countdown.scss deleted file mode 100644 index c8b635d77..000000000 --- a/apps/token/src/components/epoch-countdown/epoch-countdown.scss +++ /dev/null @@ -1,50 +0,0 @@ -@import '../../styles/colors'; - -.epoch-countdown { - h3 { - font-size: 16px; - font-weight: normal; - margin: 0 0 5px; - } - - p { - font-size: 12px; - margin: 5px 0 0; - } - - .bp3-progress-bar { - border: 1px solid $white; - border-radius: 0; - height: 21px; - - .bp3-progress-meter { - border-radius: 0; - - .bp3-dark & { - background-color: $white; - } - } - } - - &__title { - display: flex; - h3:first-child { - flex: 1; - } - } - - &__arrow { - flex: 1; - text-align: center; - - img { - display: inline-block; - width: 5px; - transform: rotate(180deg); - } - } - - &__time-range { - display: flex; - } -} diff --git a/apps/token/src/components/epoch-countdown/epoch-countdown.tsx b/apps/token/src/components/epoch-countdown/epoch-countdown.tsx index 4ee5d5871..de18196a3 100644 --- a/apps/token/src/components/epoch-countdown/epoch-countdown.tsx +++ b/apps/token/src/components/epoch-countdown/epoch-countdown.tsx @@ -1,5 +1,3 @@ -import './epoch-countdown.scss'; - import { Intent, ProgressBar } from '@blueprintjs/core'; import { format, formatDistanceStrict } from 'date-fns'; import * as React from 'react'; @@ -12,14 +10,12 @@ export interface EpochCountdownProps { id: string; startDate: Date; endDate: Date; - containerClass?: string; } export function EpochCountdown({ id, startDate, endDate, - containerClass, }: EpochCountdownProps) { const { t } = useTranslation(); const [now, setNow] = React.useState(Date.now()); @@ -61,15 +57,12 @@ export function EpochCountdown({ }, [endDate]); return ( -
-
-

+
+
+

{t('Epoch')} {id}

-

+

{endsIn ? t('Next epoch in {{endText}}', { endText: endsIn }) : t('Awaiting next epoch')} @@ -81,10 +74,14 @@ export function EpochCountdown({ stripes={false} intent={Intent.NONE} /> -

+

{format(startDate, DATE_FORMAT_DETAILED)}

-
- arrow +
+ arrow

{format(endDate, DATE_FORMAT_DETAILED)}

diff --git a/apps/token/src/components/eth-connect-prompt/eth-connect-promp.tsx b/apps/token/src/components/eth-connect-prompt/eth-connect-promp.tsx index c7c2ac3ee..6ca3eb872 100644 --- a/apps/token/src/components/eth-connect-prompt/eth-connect-promp.tsx +++ b/apps/token/src/components/eth-connect-prompt/eth-connect-promp.tsx @@ -23,7 +23,6 @@ export const EthConnectPrompt = ({ children }: EthConnectPrompProps) => { isOpen: true, }) } - className="fill" data-testid="connect-to-eth-btn" > {t('connectEthWallet')} diff --git a/apps/token/src/components/eth-wallet-container/eth-wallet-container.tsx b/apps/token/src/components/eth-wallet-container/eth-wallet-container.tsx index 87943abf0..43e5b8690 100644 --- a/apps/token/src/components/eth-wallet-container/eth-wallet-container.tsx +++ b/apps/token/src/components/eth-wallet-container/eth-wallet-container.tsx @@ -23,7 +23,7 @@ export const EthWalletContainer = ({ children }: EthWalletContainerProps) => { if (!account) { return ( + - + diff --git a/apps/token/src/components/vega-wallet-container/vega-wallet-container.tsx b/apps/token/src/components/vega-wallet-container/vega-wallet-container.tsx index c52ba2b68..41d698973 100644 --- a/apps/token/src/components/vega-wallet-container/vega-wallet-container.tsx +++ b/apps/token/src/components/vega-wallet-container/vega-wallet-container.tsx @@ -22,7 +22,6 @@ export const VegaWalletContainer = ({ children }: VegaWalletContainerProps) => { return (