Skip to content

Commit 60651b7

Browse files
authored
Merge pull request #488 from scaffold-eth/challenge-over-collateralized-lending-new-ui
Over Collateralized Lending New UI
2 parents b3dc2e8 + 26981a7 commit 60651b7

9 files changed

Lines changed: 21 additions & 19 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Deploy your contracts to a testnet then build and upload your app to a public we
4141
📥 Then download the challenge to your computer and install dependencies by running:
4242

4343
```sh
44-
npx create-eth@2.0.20 -e challenge-over-collateralized-lending challenge-over-collateralized-lending
44+
npx create-eth@2.0.22 -e challenge-over-collateralized-lending challenge-over-collateralized-lending
4545
cd challenge-over-collateralized-lending
4646
```
4747

@@ -69,6 +69,8 @@ yarn start
6969

7070
📱 Open http://localhost:3000 to see the app.
7171

72+
> _Note: the UI in screenshots may differ slightly from the current version._
73+
7274
> 👩‍💻 Restart `yarn chain` and then rerun `yarn deploy` whenever you want to deploy contract changes to the frontend. Run `yarn deploy --reset` for a completely fresh deploy, even when contracts are unchanged.
7375
7476
---

extension/README.md.args.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ yarn start
5353
5454
📱 Open http://localhost:3000 to see the app.
5555
56+
> _Note: the UI in screenshots may differ slightly from the current version._
57+
5658
> 👩‍💻 Restart \`yarn chain\` and then rerun \`yarn deploy\` whenever you want to deploy contract changes to the frontend. Run \`yarn deploy --reset\` for a completely fresh deploy, even when contracts are unchanged.
5759
5860
---

extension/packages/nextjs/app/dashboard/_components/Modals/TokenSwapModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const TokenSwapModal = ({ tokenBalance, connectedAddress, ETHprice, modal
109109
{/* dummy input to capture event onclick on modal box */}
110110
<input className="h-0 w-0 absolute top-0 left-0" />
111111
<h3 className="text-xl font-bold mb-3">Simple Swap</h3>
112-
<label htmlFor={`${modalId}`} className="btn btn-ghost btn-sm btn-circle absolute right-3 top-3">
112+
<label htmlFor={`${modalId}`} className="btn btn-ghost btn-sm btn-square absolute right-3 top-3">
113113
114114
</label>
115115
<div className="space-y-3">
@@ -150,7 +150,7 @@ export const TokenSwapModal = ({ tokenBalance, connectedAddress, ETHprice, modal
150150
</span>
151151
</div>
152152
<div className="flex justify-center">
153-
<button className="btn btn-circle btn-sm" onClick={handleChangeSellToken}>
153+
<button className="btn btn-square btn-sm" onClick={handleChangeSellToken}>
154154
<ArrowDownIcon className="h-4 w-4 my-0" />
155155
</button>
156156
</div>
@@ -169,7 +169,7 @@ export const TokenSwapModal = ({ tokenBalance, connectedAddress, ETHprice, modal
169169
{sellToken === "CORN" ? "ETH" : "CORN"}
170170
</span>
171171
</div>
172-
<button className="h-10 btn btn-primary btn-sm px-2 rounded-full" onClick={handleSwap} disabled={loading}>
172+
<button className="h-10 btn btn-primary btn-sm px-2" onClick={handleSwap} disabled={loading}>
173173
{!loading ? (
174174
<ArrowsRightLeftIcon className="h-6 w-6" />
175175
) : (

extension/packages/nextjs/app/dashboard/_components/Modals/TokenTransferModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const TokenTransferModal = ({ tokenBalance, connectedAddress, modalId }:
4444
{/* dummy input to capture event onclick on modal box */}
4545
<input className="h-0 w-0 absolute top-0 left-0" />
4646
<h3 className="text-xl font-bold mb-3">Send {tokenName}</h3>
47-
<label htmlFor={`${modalId}`} className="btn btn-ghost btn-sm btn-circle absolute right-3 top-3">
47+
<label htmlFor={`${modalId}`} className="btn btn-ghost btn-sm btn-square absolute right-3 top-3">
4848
4949
</label>
5050
<div className="space-y-2">
@@ -74,7 +74,7 @@ export const TokenTransferModal = ({ tokenBalance, connectedAddress, modalId }:
7474
placeholder="Amount"
7575
disableMultiplyBy1e18
7676
/>
77-
<button className="h-10 btn btn-primary btn-sm px-2 rounded-full" onClick={handleSend} disabled={loading}>
77+
<button className="h-10 btn btn-primary btn-sm px-2" onClick={handleSend} disabled={loading}>
7878
{!loading ? (
7979
<BanknotesIcon className="h-6 w-6" />
8080
) : (

extension/packages/nextjs/app/dashboard/_components/PriceActions.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const PriceActions = () => {
4646
};
4747

4848
return (
49-
<div className="absolute mt-10 right-5 bg-base-100 w-fit border-base-300 border shadow-md rounded-xl">
49+
<div className="absolute mt-10 right-5 bg-base-100 w-fit border-base-300 border shadow-md">
5050
<div className="w-[150px] py-5 flex flex-col items-center gap-2 indicator">
5151
<TooltipInfo top={3} right={3} infoText="Use these controls to simulate price changes" />
5252
<div className="flex items-center gap-1">
@@ -55,10 +55,10 @@ const PriceActions = () => {
5555
<span className="flex items-center text-xs">{renderPrice} ETH</span>
5656
<span className="flex items-center text-xs">{renderETHPrice} CORN/ETH</span>
5757
<div className="flex gap-2">
58-
<button onClick={() => handleClick(false)} className="btn btn-circle btn-xs">
58+
<button onClick={() => handleClick(false)} className="btn btn-square btn-xs">
5959
<MinusIcon className="h-3 w-3" />
6060
</button>
61-
<button onClick={() => handleClick(true)} className="btn btn-circle btn-xs">
61+
<button onClick={() => handleClick(true)} className="btn btn-square btn-xs">
6262
<PlusIcon className="h-3 w-3" />
6363
</button>
6464
</div>

extension/packages/nextjs/app/dashboard/_components/TokenActions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const TokenActions = () => {
4343
</label>
4444
<div className="text-lg font-semibold">
4545
<span
46-
className={`transition bg-transparent ${showAnimation ? "bg-warning rounded-xs animate-pulse-fast" : ""}`}
46+
className={`transition bg-transparent ${showAnimation ? "bg-warning animate-pulse-fast" : ""}`}
4747
>
4848
{tokenBalance} {tokenName}
4949
</span>

extension/packages/nextjs/app/page.tsx.args.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const description = `
1212
width="727"
1313
height="231"
1414
alt="challenge banner"
15-
className="rounded-xl border-4 border-primary"
15+
className="border-4 border-primary"
1616
/>
1717
<div className="max-w-3xl">
1818
<p className="text-center text-lg mt-8">
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"dependencies": {
3-
"@scaffold-ui/components": "0.1.11",
4-
"@scaffold-ui/debug-contracts": "0.1.10",
5-
"@scaffold-ui/hooks": "0.1.8",
63
"recharts": "^2.15.1"
74
}
85
}

extension/packages/nextjs/styles/globals.css.args.mjs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ export const postContent = `
1919
--color-warning: #ffcf72;
2020
--color-error: #ff8863;
2121
22-
/* radius / button rounding */
23-
--radius-field: 9999rem;
24-
--radius-box: 1rem;
22+
--radius-field: 0rem;
23+
--radius-box: 0rem;
24+
--radius-selector: 0rem;
2525
2626
/* tooltip tail width */
2727
--tt-tailw: 6px;
@@ -48,8 +48,9 @@ export const postContent = `
4848
--color-warning: #ffcf72;
4949
--color-error: #ff8863;
5050
51-
--radius-field: 9999rem;
52-
--radius-box: 1rem;
51+
--radius-field: 0rem;
52+
--radius-box: 0rem;
53+
--radius-selector: 0rem;
5354
5455
--tt-tailw: 6px;
5556
--tt-bg: var(--color-primary); /* if you need a tooltip bg override */

0 commit comments

Comments
 (0)