Skip to content

Commit

Permalink
fix: template (thirdweb-example#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
avneesh0612 authored Apr 5, 2023
1 parent 69c0371 commit d8252f5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
7 changes: 5 additions & 2 deletions components/GitHubLink.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Image from "next/image";
import React from "react";

export default function ThirdwebGuideFooter() {
const url = "https://github.com/thirdweb-example/signature-drop";

return (
<>
<div
Expand All @@ -27,13 +29,14 @@ export default function ThirdwebGuideFooter() {
right: 18,
}}
>
<img
src={"/github.png"}
<Image
src="/github.png"
width={40}
height={40}
role="button"
style={{ cursor: "pointer" }}
onClick={() => window.open(url, "_blank")}
alt="github"
/>
</div>
</>
Expand Down
21 changes: 15 additions & 6 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useAddress, useContract, Web3Button } from "@thirdweb-dev/react";
import { SignedPayload721WithQuantitySignature } from "@thirdweb-dev/sdk";
import type { NextPage } from "next";
import styles from "../styles/Home.module.css";
import Image from "next/image";

const signatureDropAddress = "0xb90a18e9270d44F6e7D06e5Eac32C6Ea881CCaB2";

Expand All @@ -23,7 +24,7 @@ const Home: NextPage = () => {
}

async function claimWithSignature() {
const signedPayloadReq = await fetch(`/api/generate-mint-signature`, {
const signedPayloadReq = await fetch("/api/generate-mint-signature", {
method: "POST",
body: JSON.stringify({
address: address,
Expand Down Expand Up @@ -73,7 +74,13 @@ const Home: NextPage = () => {

<div className={styles.nftBoxGrid}>
<div className={styles.optionSelectBox}>
<img src={`/icons/drop.webp`} alt="drop" className={styles.cardImg} />
<Image
src="/icons/drop.webp"
alt="drop"
className={styles.cardImg}
height={42}
width={42}
/>
<h2 className={styles.selectBoxTitle}>Claim NFT</h2>
<p className={styles.selectBoxDescription}>
Use the normal <code>claim</code> function to mint an NFT under the
Expand All @@ -83,15 +90,17 @@ const Home: NextPage = () => {
<Web3Button
contractAddress={signatureDropAddress}
action={() => claim()}
colorMode="dark"
theme="dark"
>
Claim
</Web3Button>
</div>

<div className={styles.optionSelectBox}>
<img
src={`/icons/analytics.png`}
<Image
width={42}
height={42}
src="/icons/analytics.png"
alt="signature-mint"
className={styles.cardImg}
/>
Expand All @@ -104,7 +113,7 @@ const Home: NextPage = () => {
<Web3Button
contractAddress={signatureDropAddress}
action={() => claimWithSignature()}
colorMode="dark"
theme="dark"
>
Claim With Signature
</Web3Button>
Expand Down
3 changes: 1 addition & 2 deletions styles/Home.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
}

.cardImg {
height: 42px;
object-fit: contain;
margin-bottom: 8px;
}

Expand All @@ -97,7 +97,6 @@
justify-content: center;
padding-left: 12px;
padding-right: 12px;
cursor: pointer;
}

@media only screen and (max-width: 800px) {
Expand Down

0 comments on commit d8252f5

Please sign in to comment.