Skip to content

Commit

Permalink
feat: fix layout on mobile market (#2149)
Browse files Browse the repository at this point in the history
  • Loading branch information
foodaka authored Aug 13, 2024
1 parent 758a98a commit 5b70f23
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 14 deletions.
1 change: 1 addition & 0 deletions public/gho-group.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/illustration-gho-logo-2.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/loveGhost.svg

This file was deleted.

1 change: 1 addition & 0 deletions public/resting-gho-hat-purple.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions src/components/ConnectWalletPaper.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Trans } from '@lingui/macro';
import { CircularProgress, Paper, PaperProps, Typography } from '@mui/material';
import { Box, CircularProgress, Paper, PaperProps, Typography } from '@mui/material';
import { ReactNode } from 'react';

import LoveGhost from '/public/loveGhost.svg';
import LandingGhost from '/public/resting-gho-hat-purple.svg';

import { ConnectWalletButton } from './WalletConnection/ConnectWalletButton';

Expand Down Expand Up @@ -31,7 +31,9 @@ export const ConnectWalletPaper = ({
...sx,
}}
>
<LoveGhost style={{ marginBottom: '16px' }} />
<Box>
<LandingGhost />
</Box>
<>
{loading ? (
<CircularProgress />
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en/messages.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ msgstr "At a discount"
#: src/components/transactions/Withdraw/WithdrawModalContent.tsx
#: src/modules/dashboard/lists/BorrowAssetsList/BorrowAssetsList.tsx
#: src/modules/dashboard/lists/BorrowAssetsList/GhoBorrowAssetsListItem.tsx
#: src/modules/markets/MarketsTopPanel.tsx
msgid "Available"
msgstr "Available"

Expand Down Expand Up @@ -591,6 +592,10 @@ msgstr "Borrowing this amount will reduce your health factor and increase risk o
msgid "Borrowing {symbol}"
msgstr "Borrowing {symbol}"

#: src/modules/markets/MarketsTopPanel.tsx
msgid "Borrows"
msgstr "Borrows"

#: src/components/transactions/GovDelegation/DelegationTypeSelector.tsx
msgid "Both"
msgstr "Both"
Expand Down Expand Up @@ -1495,6 +1500,7 @@ msgstr "Main"
msgid "Manage analytics"
msgstr "Manage analytics"

#: src/modules/markets/MarketsTopPanel.tsx
#: src/modules/reserve-overview/ReserveTopDetailsWrapper.tsx
msgid "Market"
msgstr "Market"
Expand Down
4 changes: 2 additions & 2 deletions src/modules/bridge/BridgeWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useBridgeTransactionHistory } from 'src/hooks/useBridgeTransactionHisto
import { useModalContext } from 'src/hooks/useModal';
import { useWeb3Context } from 'src/libs/hooks/useWeb3Context';

import LoveGhost from '/public/loveGhost.svg';
import LandingGhost from '/public/resting-gho-hat-purple.svg';

import { BridgeTransactionListItemWrapper } from './BridgeTransactionListItem';
import {
Expand Down Expand Up @@ -51,7 +51,7 @@ export function BridgeWrapper() {
flex: 1,
}}
>
<LoveGhost style={{ marginBottom: '16px' }} />
<LandingGhost style={{ marginBottom: '16px' }} />
<Typography variant={'h3'}>
<Trans>You don&apos;t have any bridge transactions</Trans>
</Typography>{' '}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/history/HistoryWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { useWeb3Context } from 'src/libs/hooks/useWeb3Context';
import { useRootStore } from 'src/store/root';
import { TRANSACTION_HISTORY } from 'src/utils/mixPanelEvents';

import LoveGhost from '/public/loveGhost.svg';
import LandingGhost from '/public/resting-gho-hat-purple.svg';

import { downloadData, formatTransactionData, groupByDate } from './helpers';
import { HistoryFilterMenu } from './HistoryFilterMenu';
Expand Down Expand Up @@ -130,7 +130,7 @@ export const HistoryWrapper = () => {
flex: 1,
}}
>
<LoveGhost style={{ marginBottom: '16px' }} />
<LandingGhost style={{ marginBottom: '16px' }} />
<Typography variant={downToMD ? 'h4' : 'h3'}>
<Trans>Transaction history is not currently available for this market</Trans>
</Typography>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/markets/Gho/GhoBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const GhoBanner = ({ reserve }: GhoBannerProps) => {
>
<Box
component="img"
src="/illustration-gho-logo-2.svg"
src="/gho-group.svg"
alt="ghost and coin"
sx={{
['@media screen and (min-width: 1125px)']: {
Expand Down
50 changes: 47 additions & 3 deletions src/modules/markets/MarketsTopPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,23 @@ export const MarketsTopPanel = () => {
multiMarket={MULTIPLE_MARKET_OPTIONS.includes(currentMarket) ? true : false}
>
<Box sx={{ display: 'flex', gap: { xs: 3, xsm: 8 } }}>
<TopInfoPanelItem hideIcon title={<Trans>Total market size</Trans>} loading={loading}>
<TopInfoPanelItem
hideIcon
title={
<>
{downToSM ? (
<>
<Trans>Market</Trans>
</>
) : (
<>
<Trans>Total market size</Trans>
</>
)}
</>
}
loading={loading}
>
<FormattedNumber
value={aggregatedStats.totalLiquidity.toString()}
symbol="USD"
Expand All @@ -71,7 +87,21 @@ export const MarketsTopPanel = () => {
symbolsVariant={symbolsVariant}
/>
</TopInfoPanelItem>
<TopInfoPanelItem hideIcon title={<Trans>Total available</Trans>} loading={loading}>
<TopInfoPanelItem
hideIcon
title={
<>
{downToSM ? (
<Trans>Available</Trans>
) : (
<>
<Trans>Total available</Trans>
</>
)}
</>
}
loading={loading}
>
<FormattedNumber
value={aggregatedStats.totalLiquidity.minus(aggregatedStats.totalDebt).toString()}
symbol="USD"
Expand All @@ -82,7 +112,21 @@ export const MarketsTopPanel = () => {
symbolsVariant={symbolsVariant}
/>
</TopInfoPanelItem>
<TopInfoPanelItem hideIcon title={<Trans>Total borrows</Trans>} loading={loading}>
<TopInfoPanelItem
hideIcon
title={
<>
{downToSM ? (
<Trans>Borrows</Trans>
) : (
<>
<Trans>Total borrows</Trans>
</>
)}
</>
}
loading={loading}
>
<FormattedNumber
value={aggregatedStats.totalDebt.toString()}
symbol="USD"
Expand Down

2 comments on commit 5b70f23

@github-actions
Copy link

Choose a reason for hiding this comment

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

This commit was deployed on ipfs

@github-actions
Copy link

Choose a reason for hiding this comment

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

This commit was deployed on ipfs

Please sign in to comment.