Fix TS errors

This commit is contained in:
Hariom Balhara 2022-05-17 18:29:41 +05:30
parent b6faa9a57e
commit 4b7016d3d3

View File

@ -31,7 +31,6 @@ export function canEventBeEdited({
id: User["id"];
}[];
userId: User["id"] | null;
creatorId: EventType["creatorId"];
team: {
members: {
userId: Membership["userId"];
@ -40,11 +39,6 @@ export function canEventBeEdited({
} | null;
};
}) {
// Check if he is creator.
if (eventType.creatorId === user.id) {
return true;
}
// Check if he is the owner of the team to which event belongs
if (eventType.team) {
return eventType.team.members