diff --git a/packages/nextjs/app/factory/_components/Factory.tsx b/packages/nextjs/app/factory/_components/Factory.tsx index af08cb3..4daeb58 100644 --- a/packages/nextjs/app/factory/_components/Factory.tsx +++ b/packages/nextjs/app/factory/_components/Factory.tsx @@ -1,5 +1,6 @@ "use client"; +import { useState } from "react"; import { useAccount } from "wagmi"; import { useScaffoldWatchContractEvent, useScaffoldWriteContract } from "~~/hooks/scaffold-eth"; @@ -22,6 +23,35 @@ export function Factory() { }, }); + async function onSubmit(event: any) { + event.preventDefault(); + const target = event.target; + console.log(target.name.value); + console.log(target.symbol.value); + console.log(target.uri.value); + + // await instance.updateToken(0, tokenType); + // await instance.updateToken(1, tokenType); + // await instance.setBaseURI(baseURI); + } + + const [tokens, setTokens] = useState([]); + + async function addToken(tokenType: string) { + setTokens([...tokens, tokenType]); + } + + const tokensOutputMapped = tokens.map((type, index) => { + return ( +
+

+ Token {index}: {type} +

+
+ ); + }); + + console.log(tokens); return ( <>
@@ -39,6 +69,45 @@ export function Factory() { Create Reputation Smart Contract

{"hello"}

+
+
+

Base URI

+ + {/*

Symbol

+ +

URI

+ */} + +
+ + + + + {tokensOutputMapped} +
diff --git a/packages/nextjs/components/Header.tsx b/packages/nextjs/components/Header.tsx index cffcc18..1c96989 100644 --- a/packages/nextjs/components/Header.tsx +++ b/packages/nextjs/components/Header.tsx @@ -27,8 +27,6 @@ type Props = { export const HeaderMenuLinks = ({ menuLinks }: Props) => { const pathname = usePathname(); - console.log(menuLinks); - return ( <> {menuLinks.map(({ label, href, icon }) => { @@ -144,8 +142,6 @@ export const Header = () => { ]); } - console.log(linksToAdd); - if (linksToAdd.length > 0) setInstancedHeaderLinks([...instancedHeaderLinks, ...linksToAdd]); // eslint-disable-next-line react-hooks/exhaustive-deps