fix: Back to Bookings button only shows for organizer (#9983)

This commit is contained in:
Anik Dhabal Babu
2023-07-07 11:50:44 -04:00
committed by GitHub
parent 4fda760e5e
commit 936432a730
+2 -2
View File
@@ -185,7 +185,7 @@ export default function Success(props: SuccessProps) {
// - It's a paid event and payment is pending.
const needsConfirmation = bookingInfo.status === BookingStatus.PENDING && eventType.requiresConfirmation;
const userIsOwner = !!(session?.user?.id && eventType.owner?.id === session.user.id);
const isLoggedIn = session?.user;
const isCancelled =
status === "CANCELLED" ||
status === "REJECTED" ||
@@ -310,7 +310,7 @@ export default function Success(props: SuccessProps) {
status={status}
/>
)}
{userIsOwner && !isEmbed && (
{isLoggedIn && !isEmbed && (
<div className="-mb-4 ml-4 mt-2">
<Link
href={allRemainingBookings ? "/bookings/recurring" : "/bookings/upcoming"}