diff --git a/examples/mint/src/App.tsx b/examples/mint/src/App.tsx index 0c6106e..7a38eb7 100644 --- a/examples/mint/src/App.tsx +++ b/examples/mint/src/App.tsx @@ -13,6 +13,7 @@ const nfd = NfdClient.testNet() export function App() { const [nfdName, setNfdName] = useState('') const [years, setYears] = useState(1) + const [reservedFor, setReservedFor] = useState('') const [nfdData, setNfdData] = useState(null) const [quoteData, setQuoteData] = useState(null) const [error, setError] = useState('') @@ -27,6 +28,12 @@ export function App() { setNfdName(e.target.value) } + const handleReservedForChange = (e: React.ChangeEvent) => { + setQuoteData(null) + setNfdData(null) + setReservedFor(e.target.value) + } + const handleGetQuote = async (e: React.FormEvent) => { e.preventDefault() setError('') @@ -78,6 +85,7 @@ export function App() { .mint(quote.nfdName, { buyer: quote.buyer, years: quote.years, + ...(reservedFor.trim() && { reservedFor: reservedFor.trim() }), }) setNfdData(mintedNfd) @@ -139,6 +147,20 @@ export function App() { ))} + +
+ + +