From e4c5df7a2ea630aee97bb6a0a0b0f348b31f060d Mon Sep 17 00:00:00 2001 From: Hashen <37979557+Hashen110@users.noreply.github.com> Date: Mon, 16 May 2022 22:56:32 +0530 Subject: [PATCH] remove redundant conditional expressions (#2756) * remove redundant conditional expressions * remove redundant conditional expression Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> --- apps/web/lib/webhooks/integrationTemplate.tsx | 2 +- apps/web/pages/api/import/savvycal.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/lib/webhooks/integrationTemplate.tsx b/apps/web/lib/webhooks/integrationTemplate.tsx index 6c9c9f9c27..a461789cb9 100644 --- a/apps/web/lib/webhooks/integrationTemplate.tsx +++ b/apps/web/lib/webhooks/integrationTemplate.tsx @@ -8,7 +8,7 @@ export const hasTemplateIntegration = (props: WebhookIntegrationProps) => { const ind = supportedWebhookIntegrationList.findIndex((integration) => { return props.url.includes(integration); }); - return ind > -1 ? true : false; + return ind > -1; }; const customTemplate = (props: WebhookIntegrationProps) => { diff --git a/apps/web/pages/api/import/savvycal.ts b/apps/web/pages/api/import/savvycal.ts index 4e5a809132..fd5e5c3ef7 100644 --- a/apps/web/pages/api/import/savvycal.ts +++ b/apps/web/pages/api/import/savvycal.ts @@ -57,7 +57,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) slug: eventType.slug, length: eventType.durations[0], description: eventType.description.replace(/<[^>]*>?/gm, ""), - hidden: eventType.state === "active" ? true : false, + hidden: eventType.state === "active", users: { connect: { id: authenticatedUser.id,