Skip to content

Commit

Permalink
minor UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrswastik-robot committed Apr 18, 2024
1 parent b83308a commit beb2f5e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,24 @@ const AdditionalForm = (props: Props) => {
});
} else {
// If the sponsors field doesn't exist, set it
await updateDoc(eventRef, {
sponsors: sponsors,
locationOfEvent: docSnap.data().locationOfEvent + ", " + landmark,
});

//just a waste of space and time , the code is not ever going to reach here

// await updateDoc(eventRef, {
// sponsors: sponsors,
// locationOfEvent: docSnap?.data()?.locationOfEvent + ", " + landmark,
// });
}

console.log("Update successful");
toast({
title: "Event Updated",
description: "Event has been updated successfully.",
});

router.push("/homepage2");


} catch (error) {
console.error("Error updating document: ", error);
}
Expand All @@ -140,15 +147,6 @@ const AdditionalForm = (props: Props) => {
// locationOfEvent: data.locationOfEvent + ", " + landmark;

updateEvent(eventId, data);

toast({
title: "You submitted the following values:",
description: (
<pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4">
<code className="text-white">{JSON.stringify(data, null, 2)}</code>
</pre>
),
})

}

Expand All @@ -173,7 +171,7 @@ const AdditionalForm = (props: Props) => {
onChange={(e) => setLandmark(e.target.value)}
/>
</FormControl>
{/* <div className="text-[12px] opacity-70">This is the location of the event.</div> */}
<div className="text-[12px] opacity-70">Optional*</div>
<FormMessage />
</FormItem>
)}
Expand Down
19 changes: 10 additions & 9 deletions app/homepage2/createEvent/createEvent-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -564,14 +564,15 @@ const CreatEventPage = () => {

createEventPost(data);

toast({
title: "You submitted the following values:",
description: (
<pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4">
<code className="text-white">{JSON.stringify(data, null, 2)}</code>
</pre>
),
})
// toast({
// title: "You submitted the following values:",
// description: (
// <pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4">
// <code className="text-white">{JSON.stringify(data, null, 2)}</code>
// </pre>
// ),
// })

}


Expand Down Expand Up @@ -950,7 +951,7 @@ const CreatEventPage = () => {
</FormItem>
)}
/> */}

<Button type="submit"
className=" w-full"
// disabled={isGuest === 'true'}
Expand Down

0 comments on commit beb2f5e

Please sign in to comment.