-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from The-JW-Corp/staging
Hotfix on buttons
- Loading branch information
Showing
12 changed files
with
296 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { NextResponse } from "next/server"; | ||
export async function GET() { | ||
return NextResponse.json({ | ||
hello: "world", | ||
}); | ||
} | ||
export async function POST(request: Request) { | ||
const data = await request.json; | ||
return NextResponse.json({ | ||
data, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { NextResponse } from "next/server"; | ||
export async function GET() { | ||
return NextResponse.json({ | ||
hello: "world", | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"use client"; | ||
import React, { useState } from "react"; | ||
import styles from "../styles/nft.module.css"; | ||
import Image from "next/image"; | ||
function Nft({ nfts, nftImage }) { | ||
const [selectedNfts, setSelectedNfts] = useState(new Set()); | ||
|
||
function handleNftClick(index) { | ||
setSelectedNfts((prevSelectedNfts) => { | ||
const newSelectedNfts = new Set(prevSelectedNfts); | ||
if (newSelectedNfts.has(index)) { | ||
newSelectedNfts.delete(index); | ||
} else { | ||
newSelectedNfts.add(index); | ||
} | ||
return newSelectedNfts; | ||
}); | ||
console.log(selectedNfts.size) | ||
} | ||
|
||
return ( | ||
<> | ||
{nfts.map((index) => ( | ||
<div | ||
key={index} | ||
className={ | ||
selectedNfts.has(index) | ||
? styles.nft_image_container_selected | ||
: styles.nft_image_container | ||
} | ||
onClick={() => handleNftClick(index)} | ||
> | ||
<Image | ||
src={nftImage} | ||
quality={100} | ||
alt="degen kong long background" | ||
/> | ||
</div> | ||
))} | ||
</> | ||
); | ||
} | ||
|
||
export default Nft; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.