mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
allow to customize datetime format via dayjs
This commit is contained in:
@@ -7,6 +7,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import DownloadButtonGroup from '../DownloadBtnGtoup'
|
||||
import { DownloadBtnContainer, PreviewContainer } from './Containers'
|
||||
import { LoadingIcon } from '../Loading'
|
||||
import { formatModifiedDateTime } from '../../utils/fileDetails'
|
||||
|
||||
enum PlayerState {
|
||||
Loading,
|
||||
@@ -36,11 +37,7 @@ const AudioPreview: FC<{ file: OdFileObject }> = ({ file }) => {
|
||||
<div className="flex w-full flex-col space-y-2">
|
||||
<div>{file.name}</div>
|
||||
<div className="pb-4 text-sm text-gray-500">
|
||||
Last modified:{' '}
|
||||
{new Date(file.lastModifiedDateTime).toLocaleString(undefined, {
|
||||
dateStyle: 'short',
|
||||
timeStyle: 'short',
|
||||
})}
|
||||
Last modified: {formatModifiedDateTime(file.lastModifiedDateTime)}
|
||||
</div>
|
||||
|
||||
<ReactAudioPlayer
|
||||
|
||||
Reference in New Issue
Block a user