fix(pwa+timezone)
This commit is contained in:
@@ -335,8 +335,7 @@ import { useToast } from 'vue-toastification'
|
||||
import { useRouter } from 'vue-router'
|
||||
import axios from '@/utils/axios'
|
||||
import { getMediaUrl } from '@/utils/axios'
|
||||
import { formatDistanceToNow, format } from 'date-fns'
|
||||
import { fr } from 'date-fns/locale'
|
||||
import { formatRelativeDateInFrenchTimezone, formatShortDateInFrenchTimezone } from '@/utils/dateUtils'
|
||||
import {
|
||||
Plus,
|
||||
Image,
|
||||
@@ -384,11 +383,11 @@ const uploadSuccess = ref([])
|
||||
const isDragOver = ref(false)
|
||||
|
||||
function formatRelativeDate(date) {
|
||||
return formatDistanceToNow(new Date(date), { addSuffix: true, locale: fr })
|
||||
return formatRelativeDateInFrenchTimezone(date)
|
||||
}
|
||||
|
||||
function formatDate(date) {
|
||||
return format(new Date(date), 'dd/MM/yyyy', { locale: fr })
|
||||
return formatShortDateInFrenchTimezone(date)
|
||||
}
|
||||
|
||||
function formatFileSize(bytes) {
|
||||
|
||||
Reference in New Issue
Block a user