change(ui): change time presentation

This commit is contained in:
sylenien 2022-11-18 12:11:57 +01:00 committed by Delirium
parent 7bd5d13e61
commit 3e66c0680b
2 changed files with 5 additions and 4 deletions

View file

@ -39,7 +39,7 @@ function RecordingsList() {
>
<div className="mt-3 border-b">
<div className="grid grid-cols-12 py-2 font-medium px-6">
<div className="col-span-8">Title</div>
<div className="col-span-8">Name</div>
<div className="col-span-4">By</div>
</div>

View file

@ -1,6 +1,6 @@
import React from 'react';
import { Icon, ItemMenu } from 'UI';
import { durationFromMs, checkForRecent, getDateFromMill } from 'App/date';
import { durationFromMs, formatTimeOrDate, getDateFromMill } from 'App/date';
import { IRecord } from 'App/services/RecordingsService';
import { useStore } from 'App/mstore';
import { toast } from 'react-toastify';
@ -12,7 +12,8 @@ interface Props {
function RecordsListItem(props: Props) {
const { record } = props;
const { recordingsStore } = useStore();
const { recordingsStore, settingsStore } = useStore();
const { timezone } = settingsStore.sessionSettings;
const [isEdit, setEdit] = React.useState(false);
const [recordingTitle, setRecordingTitle] = React.useState(record.name);
const inputRef = React.useRef<HTMLInputElement>(null);
@ -85,7 +86,7 @@ function RecordsListItem(props: Props) {
<div className="flex flex-col">
<div>{record.createdBy}</div>
<div className="text-gray-medium text-sm">
{checkForRecent(getDateFromMill(record.createdAt), 'LLL dd, yyyy, hh:mm a')}
{formatTimeOrDate(record.createdAt, timezone, true)}
</div>
</div>
</div>