Skip to content

Commit 0440ef6

Browse files
committed
Merge branch 'main' into development
2 parents 270a061 + d95d966 commit 0440ef6

File tree

7 files changed

+38
-18
lines changed

7 files changed

+38
-18
lines changed

app/server-components/Accounts/Account.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface Props {
1616

1717
export default async function Account({ ethAddress, licenses }: Props) {
1818
return (
19-
<BorderedCard useCustomWrapper hasFixedWidth>
19+
<BorderedCard useCustomWrapper useFixedWidthLarge>
2020
<div className="row justify-between gap-3 py-2 md:py-3 lg:gap-6 lg:py-4">
2121
<div className="min-w-[180px]">
2222
<CardItem

app/server-components/Licenses/License.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default async function License({ licenseType, licenseId }: Props) {
3838
}
3939

4040
return (
41-
<BorderedCard useCustomWrapper hasFixedWidth>
41+
<BorderedCard useCustomWrapper useFixedWidthLarge>
4242
<div className="row justify-between gap-3 py-2 md:py-3 lg:gap-6">
4343
{/* License */}
4444
<LicenseSmallCard

app/server-components/Licenses/TreasuryDistribution.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ export default async function TreasuryDistribution({ license }: Props) {
7575
<>
7676
<div className="card-title font-bold">Treasury Distribution</div>
7777

78-
<div className="col gap-3">
79-
<ListHeader>
80-
<div className="min-w-[100px]">Wallet</div>
81-
<div className="min-w-[100px]">% of GND</div>
82-
<div className="min-w-[220px]">Mined/To be mined</div>
78+
<div className="list">
79+
<ListHeader useFixedWidthSmall>
80+
<div className="min-w-[70px]">Wallet</div>
81+
<div className="min-w-[112px]">% of GND</div>
82+
<div className="min-w-[210px]">Mined/To be mined</div>
8383
<div className="min-w-[120px]">$R1 Balance</div>
8484
<div className="min-w-[120px]">Transferred Out</div>
8585
</ListHeader>
@@ -89,16 +89,16 @@ export default async function TreasuryDistribution({ license }: Props) {
8989
.sort((a, b) => b.percentage - a.percentage)
9090
.map((wallet) => (
9191
<div key={wallet.address}>
92-
<BorderedCard useCustomWrapper roundedSmall>
92+
<BorderedCard useCustomWrapper roundedSmall useFixedWidthSmall>
9393
<div className="row justify-between gap-3 py-3 lg:gap-6">
94-
<div className="min-w-[100px]">
94+
<div className="min-w-[70px]">
9595
<CardItem
9696
label="Wallet"
9797
value={<div className="text-slate-500">{wallet.name}</div>}
9898
/>
9999
</div>
100100

101-
<div className="min-w-[100px]">
101+
<div className="min-w-[112px]">
102102
<CardItem
103103
label="% of GND"
104104
value={
@@ -116,7 +116,7 @@ export default async function TreasuryDistribution({ license }: Props) {
116116
/>
117117
</div>
118118

119-
<div className="min-w-[220px]">
119+
<div className="min-w-[210px]">
120120
<CardItem
121121
label="Mined/To be mined"
122122
value={

app/server-components/Nodes/Node.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default async function Node({ ratio1Addr, node }: { ratio1Addr: R1Address
2121
}
2222

2323
return (
24-
<BorderedCard useCustomWrapper hasFixedWidth>
24+
<BorderedCard useCustomWrapper useFixedWidthLarge>
2525
<div className="row justify-between gap-3 py-2 md:py-3 lg:gap-6">
2626
<Link href={`${routePath.node}/${node.eth_addr}`} className="group min-w-[200px] py-3 lg:min-w-[228px]">
2727
<div className="row gap-1.5">

app/server-components/shared/ListHeader.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
1-
export default async function ListHeader({ children }) {
1+
import clsx from 'clsx';
2+
import { PropsWithChildren } from 'react';
3+
4+
interface Props {
5+
useFixedWidthSmall?: boolean;
6+
}
7+
8+
export default async function ListHeader({ children, useFixedWidthSmall = false }: PropsWithChildren<Props>) {
29
return (
3-
<div className="hidden w-full min-w-[1126px] items-center justify-between gap-3 rounded-xl border-2 border-slate-100 bg-slate-100 px-4 py-4 text-sm font-medium text-slate-500 lg:flex lg:gap-6 lg:px-6">
10+
<div
11+
className={clsx(
12+
'hidden w-full items-center justify-between gap-3 rounded-xl border-2 border-slate-100 bg-slate-100 px-4 py-4 text-sm font-medium text-slate-500 lg:flex lg:gap-6 lg:px-6',
13+
{
14+
'min-w-[1126px]': !useFixedWidthSmall,
15+
'min-w-[820px]': useFixedWidthSmall,
16+
},
17+
)}
18+
>
419
{children}
520
</div>
621
);

app/server-components/shared/cards/BorderedCard.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,23 @@ import { FunctionComponent, PropsWithChildren } from 'react';
33

44
interface Props {
55
useCustomWrapper?: boolean;
6-
hasFixedWidth?: boolean;
6+
useFixedWidthLarge?: boolean;
7+
useFixedWidthSmall?: boolean;
78
roundedSmall?: boolean;
89
}
910

1011
export const BorderedCard: FunctionComponent<PropsWithChildren<Props>> = ({
1112
children,
1213
useCustomWrapper = false,
13-
hasFixedWidth = false,
14+
useFixedWidthLarge = false,
15+
useFixedWidthSmall = false,
1416
roundedSmall = false,
1517
}) => {
1618
return (
1719
<div
1820
className={clsx('flex w-full overflow-hidden rounded-2xl border-2 border-slate-100 bg-slate-100', {
19-
'min-w-[1126px]': hasFixedWidth,
21+
'min-w-[1126px]': useFixedWidthLarge,
22+
'min-w-[820px]': useFixedWidthSmall,
2023
'!rounded-xl': roundedSmall,
2124
})}
2225
>

config/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,7 @@ export const getEnvironment = (hostname: string | null): 'mainnet' | 'testnet' |
132132
? ('mainnet' as const)
133133
: hostname === domains.testnet
134134
? ('testnet' as const)
135-
: ('mainnet' as const);
135+
: hostname === domains.devnet
136+
? ('devnet' as const)
137+
: ('devnet' as const);
136138
};

0 commit comments

Comments
 (0)