Skip to content

Commit

Permalink
feat: various responsive improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
chambaz committed Nov 29, 2023
1 parent d0d0203 commit 49a9377
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/marginfi-v2-ui/src/components/common/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const PageHeader: FC<PageHeaderProps> = ({ children }) => {

return (
<div className="flex w-full h-[90px] sm:h-[60px] justify-center items-center border-y bg-[url('/WaveBG3.png')]">
<div className="w-full px-4 sm:max-w-7xl flex flex-row justify-between items-center border-solid font-aeonik font-normal text-2xl sm:text-3xl">
<div className="w-full xl:w-4/5 px-4 xl:max-w-7xl flex flex-row justify-between items-center border-solid font-aeonik font-normal text-2xl sm:text-3xl">
<div className="flex gap-4 justify-center items-center">
<Mobile>
<div className="ml-[4px]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const AccountSummary = () => {
const { connected } = useWalletContext();

return (
<div className={cn("flex flex-col lg:flex-row w-full justify-between items-center")}>
<div className={cn("flex flex-col py-[10px] px-4 lg:flex-row w-full justify-between items-center")}>
<div className="font-[500] lg:block w-full h-[118px]">
<div className="h-full rounded-xl p-[10px]">
<div className="h-full rounded-xl">
<span className="w-full flex justify-start text-xl">Global stats</span>
<GlobalStats
tvl={protocolStats.tvl}
Expand All @@ -37,7 +37,7 @@ const AccountSummary = () => {

<div className="w-full">
{connected && (
<div className="font-[500] h-full rounded-xl p-[10px]">
<div className="font-[500] h-full rounded-xl">
<span className="w-full h-full flex justify-start text-xl text-white">Your account</span>
<UserStats
accountSummary={isStoreInitialized && selectedAccount ? accountSummary : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const UserPositionRow: FC<UserPositionRowProps> = ({ activeBankInfo, marginfiAcc
return (
<TableRow className="h-full w-full bg-[#171C1F] border border-[#1E2122] rounded-2xl">
<TableCell className={`text-white p-0 font-aeonik border-[1px] border-none`}>
<div className="flex justify-center items-center px-4 gap-2">
<div className="flex xl:justify-center items-center px-4 gap-2">
{activeBankInfo.meta.tokenLogoUri && (
<Image
src={activeBankInfo.meta.tokenLogoUri}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const MobileAssetsList = () => {
</Typography>
{isStoreInitialized && globalBanks ? (
globalBanks.length > 0 ? (
<div className="flex flew-row flex-wrap gap-5 justify-center items-center pt-2">
<div className="space-y-5 justify-center items-center pt-2">
{globalBanks.map((bank) => {
if (poolFilter === "stable" && !STABLECOINS.includes(bank.meta.tokenSymbol)) return null;
if (poolFilter === "lst" && !LSTS.includes(bank.meta.tokenSymbol)) return null;
Expand Down
4 changes: 2 additions & 2 deletions apps/marginfi-v2-ui/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const Home = () => {
<>
<Desktop>
<PageHeader>lend</PageHeader>
<div className="flex flex-col h-full justify-start content-start pt-[16px] w-4/5 max-w-7xl gap-4">
<div className="flex flex-col h-full justify-start content-start pt-[16px] w-full xl:w-4/5 xl:max-w-7xl gap-4">
{walletAddress && selectedAccount && isOverride && (
<Banner
text={`Read-only view of ${selectedAccount.address.toBase58()} (owner: ${shortenAddress(
Expand All @@ -107,7 +107,7 @@ const Home = () => {
)}
<DesktopAccountSummary />
</div>
<div className="pt-[16px] pb-[64px] grid w-4/5 max-w-7xl gap-4 grid-cols-1 xl:grid-cols-2">
<div className="pt-[16px] pb-[64px] px-4 grid w-full xl:w-4/5 xl:max-w-7xl gap-4 grid-cols-1 xl:grid-cols-2">
<AssetsList />
</div>
<OverlaySpinner fetching={!isStoreInitialized || isRefreshingStore} />
Expand Down

1 comment on commit 49a9377

@vercel
Copy link

@vercel vercel bot commented on 49a9377 Nov 29, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.