Add empty collection address warning

This commit is contained in:
Serkan Reis 2024-01-24 12:35:28 +03:00
parent 19e5fd0abb
commit 2a293f1a62

View File

@ -101,6 +101,12 @@ const Holders: NextPage = () => {
className="px-4 py-2 font-bold text-white bg-stargaze rounded-md" className="px-4 py-2 font-bold text-white bg-stargaze rounded-md"
isLoading={isLoading} isLoading={isLoading}
onClick={() => { onClick={() => {
if (collectionAddress.length === 0) {
toast.error('Please select a collection or enter a valid collection address.', {
style: { maxWidth: 'none' },
})
return
}
setIsLoading(true) setIsLoading(true)
fetch(snapshotEndpoint) fetch(snapshotEndpoint)
.then((response) => response.json()) .then((response) => response.json())