feat: refactor date formatting and timezone utilities for improved consistency and functionality
This commit is contained in:
@@ -21,7 +21,7 @@ import { Skeleton } from '@/components/ui/skeleton'
|
||||
import { useAuth } from '@/contexts/AuthContext'
|
||||
import { useTheme } from '@/hooks/use-theme'
|
||||
import { useLocale } from '@/hooks/use-locale'
|
||||
import { getSupportedTimezones } from '@/lib/utils/locale'
|
||||
import { getSupportedTimezones } from '@/utils/locale'
|
||||
import {
|
||||
type ApiTokenStatusResponse,
|
||||
type UserProvider,
|
||||
@@ -42,6 +42,7 @@ import {
|
||||
} from 'lucide-react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { formatDate } from '@/utils/format-date'
|
||||
|
||||
export function AccountPage() {
|
||||
const { user, setUser } = useAuth()
|
||||
@@ -320,7 +321,7 @@ export function AccountPage() {
|
||||
</div>
|
||||
<div>
|
||||
Member since:{' '}
|
||||
{new Date(user.created_at).toLocaleDateString()}
|
||||
{formatDate(user.created_at)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -623,9 +624,7 @@ export function AccountPage() {
|
||||
{apiTokenStatus.expires_at && (
|
||||
<span className="text-muted-foreground">
|
||||
(Expires:{' '}
|
||||
{new Date(
|
||||
apiTokenStatus.expires_at,
|
||||
).toLocaleDateString()}
|
||||
{formatDate(apiTokenStatus.expires_at, false)}
|
||||
)
|
||||
</span>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user