Skip to content

Commit

Permalink
fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPereira committed Jan 9, 2025
1 parent d379a79 commit 62cabe7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion packages/nextjs/app/cow/_components/PoolCreated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const PoolCreated = ({ etherscanURL, poolAddress, chainId, clearState }:
</div>
<Alert type="warning">It may take a few minutes to appear in the Balancer app</Alert>
</div>
<div className="w-80">
<div className="w-full">
<TransactionButton
title="Create Another Pool"
onClick={() => clearState()}
Expand Down
45 changes: 24 additions & 21 deletions packages/nextjs/app/cow/_components/PoolCreation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const PoolCreation = ({ poolCreation, updatePoolCreation, clearPoolCreati
<>
<div className="flex flex-wrap justify-center gap-5 ">
<div className="flex flex-col gap-5">
<div className="bg-base-200 p-6 rounded-xl shadow-xl md:w-[500px]">
<div className="bg-base-200 p-6 rounded-xl shadow-xl w-[555px]">
<div className="flex flex-col items-center gap-5 w-full min-w-[333px]">
<h5 className="text-xl md:text-2xl font-bold text-center">Preview your pool</h5>
<div className="w-full">
Expand Down Expand Up @@ -303,6 +303,10 @@ export const PoolCreation = ({ poolCreation, updatePoolCreation, clearPoolCreati
</div>
</div>

{poolCreation.step === 6 && (
<Alert type="info">CoW AMMs built on Balancer v1 set the swap fee to the maximum value</Alert>
)}

{txError && (
<Alert type="error">
<div className="flex items-center gap-2">
Expand All @@ -312,6 +316,16 @@ export const PoolCreation = ({ poolCreation, updatePoolCreation, clearPoolCreati
</Alert>
)}

{isWrongNetwork && (
<Alert type="error">
You&apos;re connected to the wrong network, switch to{" "}
<span onClick={() => switchChain?.({ chainId: poolCreation.chainId })} className="link">
{CHAIN_NAMES[poolCreation.chainId]}
</span>{" "}
to finish creating your poolCreation, or start over.
</Alert>
)}

{poolCreation.step < 8 && (
<div className="flex justify-center gap-2 items-center">
<ContactSupportModal />
Expand All @@ -323,6 +337,15 @@ export const PoolCreation = ({ poolCreation, updatePoolCreation, clearPoolCreati
/>
</div>
)}

{poolCreation.step === 8 && (
<PoolCreated
clearState={clearPoolCreation}
etherscanURL={etherscanURL}
poolAddress={poolData?.address}
chainId={poolCreation.chainId}
/>
)}
</div>
<div className="min-w-fit">
<PoolStepsDisplay
Expand Down Expand Up @@ -360,26 +383,6 @@ export const PoolCreation = ({ poolCreation, updatePoolCreation, clearPoolCreati
/>
</div>
</div>

{poolCreation.step === 6 && <Alert type="info">All CoW AMMs should set the swap fee to the maximum value</Alert>}
{poolCreation.step === 8 && (
<PoolCreated
clearState={clearPoolCreation}
etherscanURL={etherscanURL}
poolAddress={poolData?.address}
chainId={poolCreation.chainId}
/>
)}

{isWrongNetwork && (
<Alert type="error">
You&apos;re connected to the wrong network, switch to{" "}
<span onClick={() => switchChain?.({ chainId: poolCreation.chainId })} className="link">
{CHAIN_NAMES[poolCreation.chainId]}
</span>{" "}
to finish creating your poolCreation, or start over.
</Alert>
)}
</>
);
};

0 comments on commit 62cabe7

Please sign in to comment.