Skip to content

Commit ae07298

Browse files
Refactor PoweredByThirdweb rendering with conditional wrapper
Co-authored-by: gregfromstl <[email protected]>
1 parent a2d4cb5 commit ae07298

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,12 @@ export function DirectPayment({
231231
/>
232232
)}
233233

234-
<Spacer y="md" />
235-
236-
{showThirdwebBranding && <PoweredByThirdweb />}
234+
{showThirdwebBranding ? (
235+
<div>
236+
<Spacer y="md" />
237+
<PoweredByThirdweb />
238+
</div>
239+
) : null}
237240
<Spacer y="lg" />
238241
</Container>
239242
</WithHeader>

packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,12 @@ export function FundWallet({
342342
/>
343343
)}
344344

345-
<Spacer y="md" />
346-
347-
{showThirdwebBranding && <PoweredByThirdweb />}
345+
{showThirdwebBranding ? (
346+
<div>
347+
<Spacer y="md" />
348+
<PoweredByThirdweb />
349+
</div>
350+
) : null}
348351
<Spacer y="lg" />
349352
</WithHeader>
350353
);

packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,13 @@ export function TransactionPayment({
128128
}}
129129
/>
130130

131-
<Spacer y="md" />
132-
133-
{showThirdwebBranding && <PoweredByThirdweb />}
134-
<Spacer y="md" />
131+
{showThirdwebBranding ? (
132+
<div>
133+
<Spacer y="md" />
134+
<PoweredByThirdweb />
135+
<Spacer y="md" />
136+
</div>
137+
) : null}
135138
</WithHeader>
136139
);
137140
}
@@ -349,9 +352,12 @@ export function TransactionPayment({
349352
/>
350353
)}
351354

352-
<Spacer y="md" />
353-
354-
{showThirdwebBranding && <PoweredByThirdweb />}
355+
{showThirdwebBranding ? (
356+
<div>
357+
<Spacer y="md" />
358+
<PoweredByThirdweb />
359+
</div>
360+
) : null}
355361
<Spacer y="lg" />
356362
</WithHeader>
357363
);

0 commit comments

Comments
 (0)