From 83835be41ef51dd837653b4e88b8a35c43e71926 Mon Sep 17 00:00:00 2001 From: soomtochukwu Date: Thu, 1 May 2025 19:12:17 +0100 Subject: [PATCH 1/5] feat: get loan , assets --- dapp/components/_components/Card.tsx | 60 ++++ dapp/components/_components/Cards2.tsx | 0 dapp/components/_components/Header.tsx | 46 +++ dapp/components/_components/Icon.tsx | 14 + dapp/components/_components/Logo.tsx | 10 + dapp/components/_components/Search.tsx | 19 ++ dapp/components/_components/SideBar.tsx | 53 ++++ dapp/package-lock.json | 288 +++++++++++++++++- dapp/public/images/icons/bell.svg | 3 + dapp/public/images/icons/dashboard-square.svg | 6 + dapp/public/images/icons/help.svg | 3 + dapp/public/images/icons/logo.svg | 15 + dapp/public/images/icons/search.svg | 3 + dapp/src/app/borrow/assets/page.tsx | 7 + dapp/src/app/borrow/get_loan/layout.tsx | 43 +++ .../borrow/get_loan/loans_received/page.tsx | 9 + .../borrow/get_loan/offers_received/page.tsx | 9 + dapp/src/app/borrow/get_loan/page.tsx | 110 +++++++ dapp/src/app/borrow/give_loan/page.tsx | 7 + dapp/src/app/borrow/layout.tsx | 19 ++ dapp/src/app/globals.css | 5 + 21 files changed, 727 insertions(+), 2 deletions(-) create mode 100644 dapp/components/_components/Card.tsx create mode 100644 dapp/components/_components/Cards2.tsx create mode 100644 dapp/components/_components/Header.tsx create mode 100644 dapp/components/_components/Icon.tsx create mode 100644 dapp/components/_components/Logo.tsx create mode 100644 dapp/components/_components/Search.tsx create mode 100644 dapp/components/_components/SideBar.tsx create mode 100644 dapp/public/images/icons/bell.svg create mode 100644 dapp/public/images/icons/dashboard-square.svg create mode 100644 dapp/public/images/icons/help.svg create mode 100644 dapp/public/images/icons/logo.svg create mode 100644 dapp/public/images/icons/search.svg create mode 100644 dapp/src/app/borrow/assets/page.tsx create mode 100644 dapp/src/app/borrow/get_loan/layout.tsx create mode 100644 dapp/src/app/borrow/get_loan/loans_received/page.tsx create mode 100644 dapp/src/app/borrow/get_loan/offers_received/page.tsx create mode 100644 dapp/src/app/borrow/get_loan/page.tsx create mode 100644 dapp/src/app/borrow/give_loan/page.tsx create mode 100644 dapp/src/app/borrow/layout.tsx diff --git a/dapp/components/_components/Card.tsx b/dapp/components/_components/Card.tsx new file mode 100644 index 0000000..3663fd0 --- /dev/null +++ b/dapp/components/_components/Card.tsx @@ -0,0 +1,60 @@ +import Image from "next/image"; +import React from "react"; + +interface CardProp { + listed: boolean; + offered: boolean; + received: boolean; + ongoing: boolean; + title: string; + subTitle: string; + src: string; +} + +const Card = ({ + src, + offered, + ongoing, + received, + listed, + subTitle, + title, +}: CardProp) => { + return ( +
+ {received ? ( + ongoing ? ( +
Ongoing
+ ) : ( +
Closed
+ ) + ) : null} + {src} +
+
+
{title}
+
+ {subTitle} +
+
+ {listed ? ( + received ? ( +
Escrow
+ ) : ( +
Listed
+ ) + ) : ( +
+ Unlisted +
+ )} +
+ {offered ?
{received ? "View" : "See Offers"}
: null} +
+ ); +}; + +export default Card; diff --git a/dapp/components/_components/Cards2.tsx b/dapp/components/_components/Cards2.tsx new file mode 100644 index 0000000..e69de29 diff --git a/dapp/components/_components/Header.tsx b/dapp/components/_components/Header.tsx new file mode 100644 index 0000000..aebcab3 --- /dev/null +++ b/dapp/components/_components/Header.tsx @@ -0,0 +1,46 @@ +"use client" + + +import React from 'react' +import Search from './Search' +import Icon from './Icon' + +const _Icons = [ + { + src: "/images/icons/search.svg", + _function: () => { } + }, + { + src: "/images/icons/bell.svg", + _function: () => { } + }, + { + src: "/images/icons/help.svg", + _function: () => { } + }, +] + +const Header = () => { + return ( +
+
+ + +
+
+
+ { + _Icons.map((icon, index) => { + return + }) + } +
+
+ connect wallet +
+
+
+ ) +} + +export default Header \ No newline at end of file diff --git a/dapp/components/_components/Icon.tsx b/dapp/components/_components/Icon.tsx new file mode 100644 index 0000000..e1338ac --- /dev/null +++ b/dapp/components/_components/Icon.tsx @@ -0,0 +1,14 @@ +import Image from 'next/image'; +import React from 'react' + +interface IconProps { + src: string; +} + +const Icon = ({ src }: IconProps) => { + return ( + {src} + ) +} + +export default Icon \ No newline at end of file diff --git a/dapp/components/_components/Logo.tsx b/dapp/components/_components/Logo.tsx new file mode 100644 index 0000000..c75c4fc --- /dev/null +++ b/dapp/components/_components/Logo.tsx @@ -0,0 +1,10 @@ +import Image from 'next/image' +import React from 'react' + +const Logo = () => { + return ( + {'Logo'} + ) +} + +export default Logo \ No newline at end of file diff --git a/dapp/components/_components/Search.tsx b/dapp/components/_components/Search.tsx new file mode 100644 index 0000000..68b3d27 --- /dev/null +++ b/dapp/components/_components/Search.tsx @@ -0,0 +1,19 @@ +import React from 'react' +import Icon from './Icon' + +const Search = () => { + return ( +
+ + +
+ ) +} + +export default Search \ No newline at end of file diff --git a/dapp/components/_components/SideBar.tsx b/dapp/components/_components/SideBar.tsx new file mode 100644 index 0000000..24c5bc7 --- /dev/null +++ b/dapp/components/_components/SideBar.tsx @@ -0,0 +1,53 @@ +"use client" +import React from "react"; +import Logo from "./Logo"; +import Link from "next/link"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +import Search from "./Search"; +import Icon from "./Icon"; +import { usePathname } from "next/navigation"; + +const navs = [ + { + url: "/borrow/assets", + name: "My assets", + }, + { + url: "/borrow/get_loan", + name: "Get a Loan", + }, + { + url: "/borrow/give_loan", + name: "Give a Loan", + }, +]; + +const SideBar = () => { + const path = usePathname(); + return ( +
+
+ +
+ +
+ {navs.map((nav, index) => { + return ( + +
+ +
+
+ + {nav.name} +
+ + ); + })} +
+
+ ); +}; + +export default SideBar; diff --git a/dapp/package-lock.json b/dapp/package-lock.json index 7e14661..d4fdca0 100644 --- a/dapp/package-lock.json +++ b/dapp/package-lock.json @@ -826,6 +826,35 @@ "node": ">= 10" } }, + "node_modules/@noble/curves": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.7.0.tgz", + "integrity": "sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.6.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/curves/node_modules/@noble/hashes": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.0.tgz", + "integrity": "sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@noble/hashes": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz", @@ -911,6 +940,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@scure/base": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.1.tgz", + "integrity": "sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@scure/bip32": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz", @@ -971,6 +1010,33 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@scure/starknet": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@scure/starknet/-/starknet-1.1.0.tgz", + "integrity": "sha512-83g3M6Ix2qRsPN4wqLDqiRZ2GBNbjVWfboJE/9UjfG+MHr6oDSu/CWgy8hsBSJejr09DkkL+l0Ze4KVrlCIdtQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "~1.7.0", + "@noble/hashes": "~1.6.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/starknet/node_modules/@noble/hashes": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.1.tgz", + "integrity": "sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==", + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@starknet-io/types-js": { "version": "0.7.10", "resolved": "https://registry.npmjs.org/@starknet-io/types-js/-/types-js-0.7.10.tgz", @@ -3013,6 +3079,17 @@ "reusify": "^1.0.4" } }, + "node_modules/fetch-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-3.0.1.tgz", + "integrity": "sha512-ZGXe8Y5Z/1FWqQ9q/CrJhkUD73DyBU9VF0hBQmEO/wPHe4A9PKTjplFDLeFX8aOsYypZUcX5Ji/eByn3VCVO3Q==", + "license": "Unlicense", + "peer": true, + "dependencies": { + "set-cookie-parser": "^2.4.8", + "tough-cookie": "^4.0.0" + } + }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -3228,6 +3305,17 @@ "node": ">= 0.4" } }, + "node_modules/get-starknet-core": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/get-starknet-core/-/get-starknet-core-4.0.0.tgz", + "integrity": "sha512-6pLmidQZkC3wZsrHY99grQHoGpuuXqkbSP65F8ov1/JsEI8DDLkhsAuLCKFzNOK56cJp+f1bWWfTJ57e9r5eqQ==", + "deprecated": "Package no longer supported. Please use @starknet-io/get-starknet-core", + "license": "MIT", + "peer": true, + "dependencies": { + "@starknet-io/types-js": "^0.7.7" + } + }, "node_modules/get-symbol-description": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", @@ -3952,6 +4040,17 @@ "dev": true, "license": "ISC" }, + "node_modules/isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "license": "MIT", + "peer": true, + "dependencies": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, "node_modules/isows": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/isows/-/isows-1.0.6.tgz", @@ -4193,6 +4292,13 @@ "loose-envify": "cli.js" } }, + "node_modules/lossless-json": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/lossless-json/-/lossless-json-4.0.2.tgz", + "integrity": "sha512-+z0EaLi2UcWi8MZRxA5iTb6m4Ys4E80uftGY+yG5KNFJb5EceQXOhdW/pWJZ8m97s26u7yZZAYMcKWNztSZssA==", + "license": "MIT", + "peer": true + }, "node_modules/lru-cache": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", @@ -4402,6 +4508,27 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "peer": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -4663,6 +4790,13 @@ "dev": true, "license": "BlueOak-1.0.0" }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", + "license": "(MIT AND Zlib)", + "peer": true + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4941,16 +5075,35 @@ "react-is": "^16.13.1" } }, + "node_modules/psl": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "license": "MIT", + "peer": true, + "dependencies": { + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "license": "MIT", + "peer": true + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -5085,6 +5238,13 @@ "node": ">=0.10.0" } }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "license": "MIT", + "peer": true + }, "node_modules/resolve": { "version": "1.22.10", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", @@ -5235,6 +5395,13 @@ "node": ">=10" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT", + "peer": true + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -5462,6 +5629,47 @@ "dev": true, "license": "MIT" }, + "node_modules/starknet": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/starknet/-/starknet-6.24.1.tgz", + "integrity": "sha512-g7tiCt73berhcNi41otlN3T3kxZnIvZhMi8WdC21Y6GC6zoQgbI2z1t7JAZF9c4xZiomlanwVnurcpyfEdyMpg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "1.7.0", + "@noble/hashes": "1.6.0", + "@scure/base": "1.2.1", + "@scure/starknet": "1.1.0", + "abi-wan-kanabi": "^2.2.3", + "fetch-cookie": "~3.0.0", + "isomorphic-fetch": "~3.0.0", + "lossless-json": "^4.0.1", + "pako": "^2.0.4", + "starknet-types-07": "npm:@starknet-io/types-js@^0.7.10", + "ts-mixer": "^6.0.3" + } + }, + "node_modules/starknet-types-07": { + "name": "@starknet-io/types-js", + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@starknet-io/types-js/-/types-js-0.7.10.tgz", + "integrity": "sha512-1VtCqX4AHWJlRRSYGSn+4X1mqolI1Tdq62IwzoU2vUuEE72S1OlEeGhpvd6XsdqXcfHmVzYfj8k1XtKBQqwo9w==", + "license": "MIT", + "peer": true + }, + "node_modules/starknet/node_modules/@noble/hashes": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.0.tgz", + "integrity": "sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/streamsearch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", @@ -5896,6 +6104,39 @@ "node": ">=8.0" } }, + "node_modules/tough-cookie": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT", + "peer": true + }, "node_modules/ts-api-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.0.tgz", @@ -5916,6 +6157,13 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/ts-mixer": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", + "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==", + "license": "MIT", + "peer": true + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -6030,7 +6278,7 @@ "version": "5.7.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -6085,6 +6333,17 @@ "punycode": "^2.1.0" } }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -6137,6 +6396,31 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause", + "peer": true + }, + "node_modules/whatwg-fetch": { + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", + "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", + "license": "MIT", + "peer": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "peer": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/dapp/public/images/icons/bell.svg b/dapp/public/images/icons/bell.svg new file mode 100644 index 0000000..8ba3fc4 --- /dev/null +++ b/dapp/public/images/icons/bell.svg @@ -0,0 +1,3 @@ + + + diff --git a/dapp/public/images/icons/dashboard-square.svg b/dapp/public/images/icons/dashboard-square.svg new file mode 100644 index 0000000..fa64691 --- /dev/null +++ b/dapp/public/images/icons/dashboard-square.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/dapp/public/images/icons/help.svg b/dapp/public/images/icons/help.svg new file mode 100644 index 0000000..05d9fa3 --- /dev/null +++ b/dapp/public/images/icons/help.svg @@ -0,0 +1,3 @@ + + + diff --git a/dapp/public/images/icons/logo.svg b/dapp/public/images/icons/logo.svg new file mode 100644 index 0000000..a89a511 --- /dev/null +++ b/dapp/public/images/icons/logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/dapp/public/images/icons/search.svg b/dapp/public/images/icons/search.svg new file mode 100644 index 0000000..80caf3c --- /dev/null +++ b/dapp/public/images/icons/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/dapp/src/app/borrow/assets/page.tsx b/dapp/src/app/borrow/assets/page.tsx new file mode 100644 index 0000000..9787fb2 --- /dev/null +++ b/dapp/src/app/borrow/assets/page.tsx @@ -0,0 +1,7 @@ +import React from 'react' + +const page = () => { + return (<>) +} + +export default page \ No newline at end of file diff --git a/dapp/src/app/borrow/get_loan/layout.tsx b/dapp/src/app/borrow/get_loan/layout.tsx new file mode 100644 index 0000000..420f32e --- /dev/null +++ b/dapp/src/app/borrow/get_loan/layout.tsx @@ -0,0 +1,43 @@ +"use client" + +import Link from "next/link"; +import { usePathname } from "next/navigation"; + + + +const navs = [ + { + url: "/borrow/get_loan", + text: "Assets (3)", + }, + { + url: "/borrow/get_loan/offers_received", + text: "Offers Received (6)", + }, + { + url: "/borrow/get_loan/loans_received", + text: "Loans Received (1)", + }, +] +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + const path = usePathname(); + + return ( +
+
+ { + navs.map((nav, index) => { + return {nav.text} + }) + } +
+ {children} +
+ ); +} diff --git a/dapp/src/app/borrow/get_loan/loans_received/page.tsx b/dapp/src/app/borrow/get_loan/loans_received/page.tsx new file mode 100644 index 0000000..31f8e92 --- /dev/null +++ b/dapp/src/app/borrow/get_loan/loans_received/page.tsx @@ -0,0 +1,9 @@ +import React from 'react' + +const page = () => { + return ( +
Loans received
+ ) +} + +export default page \ No newline at end of file diff --git a/dapp/src/app/borrow/get_loan/offers_received/page.tsx b/dapp/src/app/borrow/get_loan/offers_received/page.tsx new file mode 100644 index 0000000..29e235c --- /dev/null +++ b/dapp/src/app/borrow/get_loan/offers_received/page.tsx @@ -0,0 +1,9 @@ +import React from 'react' + +const page = () => { + return ( +
Offers received
+ ) +} + +export default page \ No newline at end of file diff --git a/dapp/src/app/borrow/get_loan/page.tsx b/dapp/src/app/borrow/get_loan/page.tsx new file mode 100644 index 0000000..c82ae91 --- /dev/null +++ b/dapp/src/app/borrow/get_loan/page.tsx @@ -0,0 +1,110 @@ +import React from "react"; +import Search from "../../../../components/_components/Search"; +import Image from "next/image"; +import Card from "../../../../components/_components/Card"; + +const collections = [ + { + name: "Cryptopunk VQ (Wrapped ETH)", + avatar: "", + }, + { + name: "CLONE X-X", + avatar: "", + }, + { + name: "KOLLABEAR", + avatar: "", + }, + { + name: "NFT Locked Bundle ", + avatar: "", + }, + { + name: "FLUF", + avatar: "", + }, + { + name: "RANGA", + avatar: "", + }, + ], + cards = [ + { + title: "Cryptopunk #1232", + subTitle: "Cryptopunk VQ (STRK)", + ongoing: false, + received: false, + offered: false, + listed: false, + src: "/images/NFT4.png", + }, + { + title: "Cryptopunk #1232", + subTitle: "Cryptopunk VQ (STRK)", + ongoing: false, + received: false, + offered: false, + listed: false, + src: "/images/NFT1.png", + }, + { + title: "Cryptopunk #1232", + subTitle: "Cryptopunk VQ (STRK)", + ongoing: false, + received: false, + offered: false, + listed: false, + src: "/images/NFT3.png", + }, + ]; + +const page = () => { + return ( +
+ {/* collections side panel */} +
+
Collections
+ +
+ {collections.map((nft, index) => { + return ( +
+ + {"Avatar" +
{nft.name}
+
+ ); + })} +
+
+ {/* Search result section */} +
+
Search Results
+
+ {cards.map((card, index) => { + return ( + + ); + })} +
+
+
+ ); +}; + +export default page; diff --git a/dapp/src/app/borrow/give_loan/page.tsx b/dapp/src/app/borrow/give_loan/page.tsx new file mode 100644 index 0000000..9787fb2 --- /dev/null +++ b/dapp/src/app/borrow/give_loan/page.tsx @@ -0,0 +1,7 @@ +import React from 'react' + +const page = () => { + return (<>) +} + +export default page \ No newline at end of file diff --git a/dapp/src/app/borrow/layout.tsx b/dapp/src/app/borrow/layout.tsx new file mode 100644 index 0000000..857f6d0 --- /dev/null +++ b/dapp/src/app/borrow/layout.tsx @@ -0,0 +1,19 @@ +import Header from "../../../components/_components/Header"; +import SideBar from "../../../components/_components/SideBar"; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( +
+ + +
+
+
{children}
+
+
+ ); +} diff --git a/dapp/src/app/globals.css b/dapp/src/app/globals.css index 6b717ad..baef5f9 100644 --- a/dapp/src/app/globals.css +++ b/dapp/src/app/globals.css @@ -19,3 +19,8 @@ body { background: var(--background); font-family: Arial, Helvetica, sans-serif; } + +* { + font-family: monospace; + font-size: small; +} \ No newline at end of file From 642e5dcbda495023ddfbac686401e7cd7d620ae3 Mon Sep 17 00:00:00 2001 From: soomtochukwu Date: Thu, 1 May 2025 19:23:11 +0100 Subject: [PATCH 2/5] ++ --- dapp/components/_components/SideBar.tsx | 81 ++++++++++++++----------- 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/dapp/components/_components/SideBar.tsx b/dapp/components/_components/SideBar.tsx index 24c5bc7..cc5c958 100644 --- a/dapp/components/_components/SideBar.tsx +++ b/dapp/components/_components/SideBar.tsx @@ -1,4 +1,4 @@ -"use client" +"use client"; import React from "react"; import Logo from "./Logo"; import Link from "next/link"; @@ -9,45 +9,52 @@ import Icon from "./Icon"; import { usePathname } from "next/navigation"; const navs = [ - { - url: "/borrow/assets", - name: "My assets", - }, - { - url: "/borrow/get_loan", - name: "Get a Loan", - }, - { - url: "/borrow/give_loan", - name: "Give a Loan", - }, + { + url: "/borrow/assets", + name: "My assets", + }, + { + url: "/borrow/get_loan", + name: "Get a Loan", + }, + { + url: "/borrow/give_loan", + name: "Give a Loan", + }, ]; const SideBar = () => { - const path = usePathname(); - return ( -
-
- -
- -
- {navs.map((nav, index) => { - return ( - -
- -
-
- - {nav.name} -
- - ); - })} -
-
- ); + const path = usePathname(); + return ( +
+
+ + + +
+ +
+ {navs.map((nav, index) => { + return ( + +
+ +
+
{nav.name}
+ + ); + })} +
+
+ ); }; export default SideBar; From a3f9721818964d1905a7cc6bddb3b6f07af87e7c Mon Sep 17 00:00:00 2001 From: soomtochukwu Date: Thu, 1 May 2025 22:43:47 +0100 Subject: [PATCH 3/5] fix: tailwind config for better and fast rendering --- dapp/components/_components/Search.tsx | 32 +++++++++++++------------- dapp/tailwind.config.ts | 1 + 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/dapp/components/_components/Search.tsx b/dapp/components/_components/Search.tsx index 68b3d27..fac9c8c 100644 --- a/dapp/components/_components/Search.tsx +++ b/dapp/components/_components/Search.tsx @@ -1,19 +1,19 @@ -import React from 'react' -import Icon from './Icon' +import React from "react"; +import Icon from "./Icon"; const Search = () => { - return ( -
- - -
- ) -} + return ( +
+ + +
+ ); +}; -export default Search \ No newline at end of file +export default Search; diff --git a/dapp/tailwind.config.ts b/dapp/tailwind.config.ts index 109807b..e25ac66 100644 --- a/dapp/tailwind.config.ts +++ b/dapp/tailwind.config.ts @@ -5,6 +5,7 @@ export default { "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", "./src/components/**/*.{js,ts,jsx,tsx,mdx}", "./src/app/**/*.{js,ts,jsx,tsx,mdx}", + "./components/**/*.{js,ts,jsx,tsx,mdx}", ], theme: { extend: { From 5585b5256d8911ba91e7a573d5b5d97ef47adec9 Mon Sep 17 00:00:00 2001 From: soomtochukwu Date: Thu, 1 May 2025 23:31:58 +0100 Subject: [PATCH 4/5] feat: media query optimised --- dapp/components/_components/Card.tsx | 2 +- dapp/components/_components/SideBar.tsx | 2 +- dapp/src/app/borrow/get_loan/layout.tsx | 72 +++++++++++++------------ dapp/src/app/borrow/get_loan/page.tsx | 4 +- 4 files changed, 43 insertions(+), 37 deletions(-) diff --git a/dapp/components/_components/Card.tsx b/dapp/components/_components/Card.tsx index 3663fd0..e86f208 100644 --- a/dapp/components/_components/Card.tsx +++ b/dapp/components/_components/Card.tsx @@ -21,7 +21,7 @@ const Card = ({ title, }: CardProp) => { return ( -
+
{received ? ( ongoing ? (
Ongoing
diff --git a/dapp/components/_components/SideBar.tsx b/dapp/components/_components/SideBar.tsx index cc5c958..4676075 100644 --- a/dapp/components/_components/SideBar.tsx +++ b/dapp/components/_components/SideBar.tsx @@ -38,7 +38,7 @@ const SideBar = () => { return ( ) { - const path = usePathname(); + const path = usePathname(); - return ( -
-
- { - navs.map((nav, index) => { - return {nav.text} - }) - } -
- {children} -
- ); + return ( +
+
+ {navs.map((nav, index) => { + return ( + + {nav.text} + + ); + })} +
+ {children} +
+ ); } diff --git a/dapp/src/app/borrow/get_loan/page.tsx b/dapp/src/app/borrow/get_loan/page.tsx index c82ae91..2b3da0f 100644 --- a/dapp/src/app/borrow/get_loan/page.tsx +++ b/dapp/src/app/borrow/get_loan/page.tsx @@ -61,7 +61,7 @@ const collections = [ const page = () => { return ( -
+
{/* collections side panel */}
Collections
@@ -86,7 +86,7 @@ const page = () => { {/* Search result section */}
Search Results
-
+
{cards.map((card, index) => { return ( Date: Sun, 4 May 2025 10:16:42 +0100 Subject: [PATCH 5/5] feat: offers received sub-page added --- dapp/components/_components/Card.tsx | 16 +- dapp/package-lock.json | 288 +----------------- .../borrow/get_loan/offers_received/page.tsx | 46 ++- 3 files changed, 58 insertions(+), 292 deletions(-) diff --git a/dapp/components/_components/Card.tsx b/dapp/components/_components/Card.tsx index e86f208..93b8c8c 100644 --- a/dapp/components/_components/Card.tsx +++ b/dapp/components/_components/Card.tsx @@ -29,8 +29,8 @@ const Card = ({
Closed
) ) : null} - {src} -
+ {src} +
{title}
@@ -41,18 +41,24 @@ const Card = ({ received ? (
Escrow
) : ( -
Listed
+
+ Listed +
) ) : (
Unlisted
)}
- {offered ?
{received ? "View" : "See Offers"}
: null} + {offered ? ( +
+ {received ? "View" : "See Offers"} +
+ ) : null}
); }; diff --git a/dapp/package-lock.json b/dapp/package-lock.json index d4fdca0..7e14661 100644 --- a/dapp/package-lock.json +++ b/dapp/package-lock.json @@ -826,35 +826,6 @@ "node": ">= 10" } }, - "node_modules/@noble/curves": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.7.0.tgz", - "integrity": "sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==", - "license": "MIT", - "peer": true, - "dependencies": { - "@noble/hashes": "1.6.0" - }, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@noble/curves/node_modules/@noble/hashes": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.0.tgz", - "integrity": "sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==", - "license": "MIT", - "peer": true, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@noble/hashes": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz", @@ -940,16 +911,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@scure/base": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.1.tgz", - "integrity": "sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==", - "license": "MIT", - "peer": true, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@scure/bip32": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz", @@ -1010,33 +971,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/@scure/starknet": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@scure/starknet/-/starknet-1.1.0.tgz", - "integrity": "sha512-83g3M6Ix2qRsPN4wqLDqiRZ2GBNbjVWfboJE/9UjfG+MHr6oDSu/CWgy8hsBSJejr09DkkL+l0Ze4KVrlCIdtQ==", - "license": "MIT", - "peer": true, - "dependencies": { - "@noble/curves": "~1.7.0", - "@noble/hashes": "~1.6.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/starknet/node_modules/@noble/hashes": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.1.tgz", - "integrity": "sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==", - "license": "MIT", - "peer": true, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@starknet-io/types-js": { "version": "0.7.10", "resolved": "https://registry.npmjs.org/@starknet-io/types-js/-/types-js-0.7.10.tgz", @@ -3079,17 +3013,6 @@ "reusify": "^1.0.4" } }, - "node_modules/fetch-cookie": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-3.0.1.tgz", - "integrity": "sha512-ZGXe8Y5Z/1FWqQ9q/CrJhkUD73DyBU9VF0hBQmEO/wPHe4A9PKTjplFDLeFX8aOsYypZUcX5Ji/eByn3VCVO3Q==", - "license": "Unlicense", - "peer": true, - "dependencies": { - "set-cookie-parser": "^2.4.8", - "tough-cookie": "^4.0.0" - } - }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -3305,17 +3228,6 @@ "node": ">= 0.4" } }, - "node_modules/get-starknet-core": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/get-starknet-core/-/get-starknet-core-4.0.0.tgz", - "integrity": "sha512-6pLmidQZkC3wZsrHY99grQHoGpuuXqkbSP65F8ov1/JsEI8DDLkhsAuLCKFzNOK56cJp+f1bWWfTJ57e9r5eqQ==", - "deprecated": "Package no longer supported. Please use @starknet-io/get-starknet-core", - "license": "MIT", - "peer": true, - "dependencies": { - "@starknet-io/types-js": "^0.7.7" - } - }, "node_modules/get-symbol-description": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", @@ -4040,17 +3952,6 @@ "dev": true, "license": "ISC" }, - "node_modules/isomorphic-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", - "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", - "license": "MIT", - "peer": true, - "dependencies": { - "node-fetch": "^2.6.1", - "whatwg-fetch": "^3.4.1" - } - }, "node_modules/isows": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/isows/-/isows-1.0.6.tgz", @@ -4292,13 +4193,6 @@ "loose-envify": "cli.js" } }, - "node_modules/lossless-json": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/lossless-json/-/lossless-json-4.0.2.tgz", - "integrity": "sha512-+z0EaLi2UcWi8MZRxA5iTb6m4Ys4E80uftGY+yG5KNFJb5EceQXOhdW/pWJZ8m97s26u7yZZAYMcKWNztSZssA==", - "license": "MIT", - "peer": true - }, "node_modules/lru-cache": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", @@ -4508,27 +4402,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", - "peer": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -4790,13 +4663,6 @@ "dev": true, "license": "BlueOak-1.0.0" }, - "node_modules/pako": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", - "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", - "license": "(MIT AND Zlib)", - "peer": true - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -5075,35 +4941,16 @@ "react-is": "^16.13.1" } }, - "node_modules/psl": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", - "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", - "license": "MIT", - "peer": true, - "dependencies": { - "punycode": "^2.3.1" - }, - "funding": { - "url": "https://github.com/sponsors/lupomontero" - } - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "license": "MIT", - "peer": true - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -5238,13 +5085,6 @@ "node": ">=0.10.0" } }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "license": "MIT", - "peer": true - }, "node_modules/resolve": { "version": "1.22.10", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", @@ -5395,13 +5235,6 @@ "node": ">=10" } }, - "node_modules/set-cookie-parser": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", - "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", - "license": "MIT", - "peer": true - }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -5629,47 +5462,6 @@ "dev": true, "license": "MIT" }, - "node_modules/starknet": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/starknet/-/starknet-6.24.1.tgz", - "integrity": "sha512-g7tiCt73berhcNi41otlN3T3kxZnIvZhMi8WdC21Y6GC6zoQgbI2z1t7JAZF9c4xZiomlanwVnurcpyfEdyMpg==", - "license": "MIT", - "peer": true, - "dependencies": { - "@noble/curves": "1.7.0", - "@noble/hashes": "1.6.0", - "@scure/base": "1.2.1", - "@scure/starknet": "1.1.0", - "abi-wan-kanabi": "^2.2.3", - "fetch-cookie": "~3.0.0", - "isomorphic-fetch": "~3.0.0", - "lossless-json": "^4.0.1", - "pako": "^2.0.4", - "starknet-types-07": "npm:@starknet-io/types-js@^0.7.10", - "ts-mixer": "^6.0.3" - } - }, - "node_modules/starknet-types-07": { - "name": "@starknet-io/types-js", - "version": "0.7.10", - "resolved": "https://registry.npmjs.org/@starknet-io/types-js/-/types-js-0.7.10.tgz", - "integrity": "sha512-1VtCqX4AHWJlRRSYGSn+4X1mqolI1Tdq62IwzoU2vUuEE72S1OlEeGhpvd6XsdqXcfHmVzYfj8k1XtKBQqwo9w==", - "license": "MIT", - "peer": true - }, - "node_modules/starknet/node_modules/@noble/hashes": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.0.tgz", - "integrity": "sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==", - "license": "MIT", - "peer": true, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/streamsearch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", @@ -6104,39 +5896,6 @@ "node": ">=8.0" } }, - "node_modules/tough-cookie": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", - "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tough-cookie/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT", - "peer": true - }, "node_modules/ts-api-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.0.tgz", @@ -6157,13 +5916,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/ts-mixer": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", - "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==", - "license": "MIT", - "peer": true - }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -6278,7 +6030,7 @@ "version": "5.7.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -6333,17 +6085,6 @@ "punycode": "^2.1.0" } }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "license": "MIT", - "peer": true, - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -6396,31 +6137,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause", - "peer": true - }, - "node_modules/whatwg-fetch": { - "version": "3.6.20", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", - "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", - "license": "MIT", - "peer": true - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", - "peer": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/dapp/src/app/borrow/get_loan/offers_received/page.tsx b/dapp/src/app/borrow/get_loan/offers_received/page.tsx index 29e235c..16d7ae9 100644 --- a/dapp/src/app/borrow/get_loan/offers_received/page.tsx +++ b/dapp/src/app/borrow/get_loan/offers_received/page.tsx @@ -1,8 +1,52 @@ import React from 'react' +import Card from '../../../../../components/_components/Card'; + + +const cards = [ + { + title: "Cryptopunk #1232", + subTitle: "Cryptopunk VQ (STRK)", + ongoing: false, + received: false, + offered: true, + listed: true, + src: "/images/NFT4.png", + }, + { + title: "Cryptopunk #1232", + subTitle: "Cryptopunk VQ (STRK)", + ongoing: false, + received: false, + offered: true, + listed: true, + src: "/images/NFT1.png", + }, +]; const page = () => { return ( -
Offers received
+
+ +
All Listings
+ +
+ {cards.map((card, index) => { + return ( + + ); + })} +
+
+ ) }