Skip to content

Commit

Permalink
💄 style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
franm91 committed Dec 7, 2023
1 parent 2102f00 commit 9105728
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
53 changes: 27 additions & 26 deletions components/markets/MarketsTables/poolTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ const PoolTable: FC<PoolTableProps> = ({ isLoading, headers, rows }) => {
const { setOrderBy, sortData, direction: sortDirection, isActive: sortActive } = useSorting<TableRow>();
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', {
Expand Down Expand Up @@ -200,26 +200,27 @@ const PoolTable: FC<PoolTableProps> = ({ isLoading, headers, rows }) => {
</Box>
)}
</TableCell>
<Tooltip
title={
getRateType(depositMaturity) === 'fixed' &&
t(
'In order to deposit at a fixed rate, there must have been fixed rate loans at the same maturity previously to ensure the solvency condition',
)
}
arrow
placement="top"

<TableCell
align="left"
size="small"
width={50}
onClick={(e) => e.preventDefault()}
sx={{ cursor: 'default', pl: 1.5, pr: 3, width: '200px' }}
>
<TableCell
align="left"
size="small"
width={50}
onClick={(e) => e.preventDefault()}
sx={{ cursor: 'default', pl: 1.5, pr: 3, width: '200px' }}
>
{isLoading ? (
<Skeleton sx={{ borderRadius: '32px' }} variant="rounded" height={34} width={80} />
) : (
{isLoading ? (
<Skeleton sx={{ borderRadius: '32px' }} variant="rounded" height={34} width={80} />
) : (
<Tooltip
title={
getRateType(depositMaturity) === 'fixed' &&
t(
'In order to deposit at a fixed rate, there must have been fixed rate loans at the same maturity previously to ensure the solvency condition',
)
}
arrow
placement="top"
>
<Button
variant="contained"
onClick={(e) => handleDepositClick(e, symbol, depositMaturity)}
Expand All @@ -229,9 +230,9 @@ const PoolTable: FC<PoolTableProps> = ({ isLoading, headers, rows }) => {
>
{t('Deposit')}
</Button>
)}
</TableCell>
</Tooltip>
</Tooltip>
)}
</TableCell>
<TableCell align="left" sx={{ width: '170px', py: 3, pl: 3, pr: 1.5 }}>
<Typography fontWeight={700}>
{isLoading ? <Skeleton width={80} /> : `$${totalBorrowed}`}
Expand Down
5 changes: 3 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -11,6 +11,7 @@ import { useCustomTheme } from 'contexts/ThemeContext';

const Markets: NextPage = () => {
const { view } = useCustomTheme();
const { palette } = useTheme();

if (!view) return null;

Expand All @@ -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,
}}
/>
Expand Down

1 comment on commit 9105728

@vercel
Copy link

@vercel vercel bot commented on 9105728 Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

app – ./

exactly-development.vercel.app
app.exact.ly
app.exactly.app
app-git-main.exactly.app

Please sign in to comment.