diff --git a/pages/create/index.tsx b/pages/create/index.tsx index fae521e..e23f3e1 100644 --- a/pages/create/index.tsx +++ b/pages/create/index.tsx @@ -194,6 +194,19 @@ const Create: NextPage = () => { Venue: JSON.stringify(event.venue), IRL: event.category.event_type === 'In-Person', }); + await supabase.from('polygonevent').insert({ + contractAddress: child, + link: event.link, + seats: event.seats, + childAddress: child, + title: event.title, + walletAddress: wallet.address, + date: event.date, + description: JSON.stringify(event.description), + image: JSON.stringify(event.image), + venue: JSON.stringify(event.venue), + category: JSON.stringify(event.category), + }); setEventLink(`${window.location.origin}/event/${child}`); setIsPublished(true); setInTxn(false); @@ -281,6 +294,19 @@ const Create: NextPage = () => { Venue: JSON.stringify(event.venue), IRL: event.category.event_type === 'In-Person', }); + await supabase.from('polygonevent').insert({ + contractAddress: child, + childAddress: child, + title: event.title, + link: event.link, + seats: event.seats, + date: event.date, + walletAddress: wallet.address, + description: JSON.stringify(event.description), + image: JSON.stringify(event.image), + venue: JSON.stringify(event.venue), + category: JSON.stringify(event.category), + }); setEventLink(`${window.location.origin}/event/${child}`); setIsPublished(true); setInTxn(false); @@ -572,6 +598,7 @@ const Create: NextPage = () => { Venue: JSON.stringify(event.venue), IRL: event.category.event_type === 'In-Person', }); + setIsPublished(true); setInTxn(false); setFormData(defaultFormData);