Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'

import { isSmtpEnabled } from '../SmtpForm/SmtpForm.utils'
import { type AuthTemplateType, type KebabCase } from './EmailTemplates.types'
import type { components } from '@/data/api'
import type { Organization } from '@/types'

dayjs.extend(utc)

type AuthConfig = components['schemas']['GoTrueConfigResponse']

/**
Expand Down Expand Up @@ -46,7 +49,7 @@ export const isCustomEmailTemplateRestrictionStatusKnown = ({
}

export const isBeforeFreeTierTemplateBlockCutoff = (projectInsertedAt?: string) => {
return dayjs(projectInsertedAt).isBefore(FREE_TIER_TEMPLATE_BLOCK_CUTOFF_DATE)
return dayjs.utc(projectInsertedAt).isBefore(FREE_TIER_TEMPLATE_BLOCK_CUTOFF_DATE)
}

export const isCustomEmailTemplateEditingRestricted = ({
Expand Down
Loading