Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunkomath committed Jan 12, 2025
1 parent 8c2e1be commit 3c383b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
14 changes: 3 additions & 11 deletions app/(dashboard)/[tenant]/projects/[projectId]/events/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

import { calendarEvent, eventInvite } from "@/drizzle/schema";
import { generateObjectDiffMessage, logActivity } from "@/lib/activity";
import {
toDateString,
toEndOfDay,
toMachineDateString,
} from "@/lib/utils/date";
import { toEndOfDay } from "@/lib/utils/date";
import { database } from "@/lib/utils/useDatabase";
import { getOwner, getTimezone } from "@/lib/utils/useOwner";
import { and, eq } from "drizzle-orm";
Expand Down Expand Up @@ -99,11 +95,9 @@ export async function createEvent(payload: FormData) {
projectId: +projectId,
});

const timezone = await getTimezone();

revalidatePath(`/${orgSlug}/projects/${projectId}/events`);
redirect(
`/${orgSlug}/projects/${projectId}/events?on=${toMachineDateString(start, timezone)}`,
`/${orgSlug}/projects/${projectId}/events?on=${start.toISOString()}`,
);
}

Expand Down Expand Up @@ -169,11 +163,9 @@ export async function updateEvent(payload: FormData) {
projectId: +projectId,
});

const timezone = await getTimezone();

revalidatePath(`/${orgSlug}/projects/${projectId}/events`);
redirect(
`/${orgSlug}/projects/${projectId}/events?on=${toMachineDateString(start, timezone)}`,
`/${orgSlug}/projects/${projectId}/events?on=${start.toISOString()}`,
);
}

Expand Down
2 changes: 1 addition & 1 deletion components/project/activity/activity-feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function ActivityFeed({
<ActivityItem
key={activityItem.id}
item={activityItem}
isLast={activityItemIdx === activities.length - 1}
isLast={activityItemIdx === initialActivities.length - 1}
/>
))}
</ul>
Expand Down

0 comments on commit 3c383b3

Please sign in to comment.