Skip to content

Commit 4d4a35f

Browse files
Use thirdweb react package (#47)
* Rename files * Rename folder * Last renamings * Make editionDrop work * Make nft-drop work * Delete unused stuff, wip * Make marketplace work * Small renamings * Deprecation notice * Fix sdk init * Delete unused code * Update import * Update sdkOptions * Use claimed/unclaimed hooks * Revert claimed/unclaimed * Use react hooks * Fix claimed/unclaimed * Fix ipfs gateway * Update missing activeClaimCondition * Use fixed hooks * Fix error * Use ThirdwebNftMedia * One less prop * Fix unused prop * Add token-drop wip * Abstract Header * Use new react hooks * Use useClaimNFT mutation * Use auction hooks * Fix typo * Update sdk, fix typo * Use react hooks for marketplace * Token drop wip * Update react SDK * Fix direct listing hooks * Update sdks * Update to react 18, update to chakra 2, fix toasts * Fix maxClaimable * Update wording * Fix errors, hide inventory * Fix token balance and all errors
1 parent e1e1e7f commit 4d4a35f

26 files changed

+2476
-2908
lines changed

.github/workflows/deploy.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
id: upload
5353
uses: anantaramdas/[email protected]
5454
with:
55-
pin-name: Thirdweb Widgets ${{ needs.bump_version.outputs.new_tag }}
55+
pin-name: thirdweb embeds ${{ needs.bump_version.outputs.new_tag }}
5656
path: './dist'
5757
pinata-api-key: ${{ secrets.PINATA_API_KEY }}
5858
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }}
@@ -78,7 +78,7 @@ jobs:
7878
needs: release
7979
strategy:
8080
matrix:
81-
filename: ['marketplace.html', 'bundledrop.html', 'drop.html']
81+
filename: ['marketplace.html', 'edition-drop.html', 'nft-drop.html']
8282
gateway: ['ipfs.io', 'cloudflare-ipfs.com', 'gateway.pinata.cloud', 'ipfs.thirdweb.com']
8383
steps:
8484
- name: Warming ${{ matrix.gateway }} - ${{ matrix.filename }}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# widgets
1+
# thirdweb embeds

package.json

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "thirdweb-widgets",
2+
"name": "thirdweb-embeds",
33
"version": "2.0.0",
44
"description": "",
55
"scripts": {
@@ -11,21 +11,21 @@
1111
},
1212
"repository": {
1313
"type": "git",
14-
"url": "git+https://github.com/nftlabs/widgets.git"
14+
"url": "git+https://github.com/thirdweb-dev/widgets.git"
1515
},
1616
"author": "Non-Fungible Labs, Inc",
1717
"license": "Apache-2.0",
1818
"bugs": {
19-
"url": "https://github.com/nftlabs/widgets/issues"
19+
"url": "https://github.com/thirdweb-dev/widgets/issues"
2020
},
21-
"homepage": "https://github.com/nftlabs/widgets#readme",
21+
"homepage": "https://github.com/thirdweb-dev/widgets#readme",
2222
"browserslist": "> 0.5%, last 2 versions, not dead",
2323
"devDependencies": {
24-
"@chakra-ui/cli": "^1.5.3",
24+
"@chakra-ui/cli": "^2.0.0",
2525
"@next/eslint-plugin-next": "^12.1.0",
2626
"@types/flat": "^5.0.2",
27-
"@types/react": "^17.0.37",
28-
"@types/react-dom": "^17.0.11",
27+
"@types/react": "^18.0.9",
28+
"@types/react-dom": "^18.0.4",
2929
"@typescript-eslint/eslint-plugin": "^5.14.0",
3030
"@typescript-eslint/parser": "^5.14.0",
3131
"esbuild": "^0.14.2",
@@ -40,22 +40,21 @@
4040
"parcel": "^2.2.1",
4141
"prettier": "^2.4.1",
4242
"prettier-plugin-organize-imports": "^2.3.4",
43-
"typescript": "^4.4.4",
44-
"util": "^0.12.4"
43+
"typescript": "^4.4.4"
4544
},
4645
"dependencies": {
4746
"@chakra-ui/icons": "^1.1.1",
48-
"@chakra-ui/react": "^1.7.2",
47+
"@chakra-ui/react": "^2.1.0",
4948
"@emotion/react": "^11",
5049
"@emotion/styled": "^11",
51-
"@thirdweb-dev/sdk": "^2.2.9",
52-
"ethers": "^5.5.2",
50+
"@thirdweb-dev/react": "^2.3.11-4",
51+
"@thirdweb-dev/sdk": "^2.2.16-7",
52+
"ethers": "^5.6.7",
5353
"flat": "^5.0.2",
5454
"framer-motion": "^6",
55-
"react": "^17.0.2",
56-
"react-dom": "^17.0.2",
55+
"react": "^18.1.0",
56+
"react-dom": "^18.1.0",
5757
"react-icons": "^4.3.1",
58-
"react-query": "^3.34.1",
5958
"wagmi": "^0.2.9"
6059
},
6160
"resolutions": {

parcel-build.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
</head>
2121
<body>
2222
<div id="root"></div>
23-
<script type="module" src="./src/widgets/drop.tsx"></script>
23+
<script type="module" src="./src/embeds/nft-drop.tsx"></script>
2424
</body>
2525
</html>

scripts/build.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
const path = require("path");
22
const fs = require("fs");
33

4-
const WIDGETS_SRC_PATH = path.resolve(process.cwd(), "src/widgets");
4+
const EMBEDS_SRC_PATH = path.resolve(process.cwd(), "src/embeds");
55
const DIST_PATH = path.resolve(process.cwd(), "dist/");
66

7-
const files = fs.readdirSync(WIDGETS_SRC_PATH);
7+
const files = fs.readdirSync(EMBEDS_SRC_PATH);
88

99
fs.rmSync(DIST_PATH, { recursive: true, force: true });
1010

1111
require("esbuild")
1212
.build({
13-
entryPoints: files.map((f) => path.resolve(WIDGETS_SRC_PATH, f)),
13+
entryPoints: files.map((f) => path.resolve(EMBEDS_SRC_PATH, f)),
1414
bundle: true,
1515
minify: true,
1616
platform: "browser",
@@ -24,7 +24,7 @@ require("esbuild")
2424
env: "production"
2525
})
2626
},
27-
inject: ['./buffer-shim.js']
27+
inject: ['./buffer-shim.js']
2828
})
2929
.then((result) => {
3030
for (const file of result.outputFiles) {

0 commit comments

Comments
 (0)