From 910572880070e4e76648c3c1d31c36fbe29027a3 Mon Sep 17 00:00:00 2001 From: franm Date: Thu, 7 Dec 2023 16:55:16 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../markets/MarketsTables/poolTable/index.tsx | 53 ++++++++++--------- pages/index.tsx | 5 +- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/components/markets/MarketsTables/poolTable/index.tsx b/components/markets/MarketsTables/poolTable/index.tsx index f77d0b8dd..6b6c40ee0 100644 --- a/components/markets/MarketsTables/poolTable/index.tsx +++ b/components/markets/MarketsTables/poolTable/index.tsx @@ -56,10 +56,10 @@ const PoolTable: FC = ({ isLoading, headers, rows }) => { const { setOrderBy, sortData, direction: sortDirection, isActive: sortActive } = useSorting(); const tempRows = isLoading ? defaultRows : rows; - const getRateType = useCallback((maturity: bigint | undefined) => { - if (maturity === undefined) return 'floating'; - return maturity === 0n ? 'floating' : 'fixed'; - }, []); + const getRateType = useCallback( + (maturity: bigint | undefined) => (maturity === undefined || maturity === 0n ? 'floating' : 'fixed'), + [], + ); const trackRowClick = useCallback((symbol: string) => { track('Button Clicked', { @@ -200,26 +200,27 @@ const PoolTable: FC = ({ isLoading, headers, rows }) => { )} - e.preventDefault()} + sx={{ cursor: 'default', pl: 1.5, pr: 3, width: '200px' }} > - e.preventDefault()} - sx={{ cursor: 'default', pl: 1.5, pr: 3, width: '200px' }} - > - {isLoading ? ( - - ) : ( + {isLoading ? ( + + ) : ( + - )} - - + + )} + {isLoading ? : `$${totalBorrowed}`} diff --git a/pages/index.tsx b/pages/index.tsx index 8720d2fbb..55c3f8307 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; import type { NextPage } from 'next'; -import { Box, Grid } from '@mui/material'; +import { Box, Grid, useTheme } from '@mui/material'; import MarketsHeader from 'components/markets/Header'; import MarketTables from 'components/markets/MarketsTables'; @@ -11,6 +11,7 @@ import { useCustomTheme } from 'contexts/ThemeContext'; const Markets: NextPage = () => { const { view } = useCustomTheme(); + const { palette } = useTheme(); if (!view) return null; @@ -23,7 +24,7 @@ const Markets: NextPage = () => { width: '100%', left: 0, top: 0, - backgroundColor: 'grey.300', + backgroundColor: palette.mode === 'light' ? 'grey.300' : '#181A1B', zIndex: -1, }} />