mirror of
https://github.com/supabase/supabase.git
synced 2026-05-22 17:00:43 +08:00
* Use email instead of username in org member list * Minor clean up --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
11 lines
299 B
TypeScript
11 lines
299 B
TypeScript
// Invite is expired if older than 24hrs
|
|
export function isInviteExpired(timestamp: string) {
|
|
const inviteDate = new Date(timestamp)
|
|
const now = new Date()
|
|
const timeBetween = now.valueOf() - inviteDate.valueOf()
|
|
if (timeBetween / 1000 / 60 / 60 < 24) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|