Added last update, cache strategy, telegram fail notifications, teachers photos
This commit is contained in:
14
src/entities/last-update-at/index.tsx
Normal file
14
src/entities/last-update-at/index.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { formatDistanceStrict } from 'date-fns'
|
||||
import { ru as dateFnsRuLocale } from 'date-fns/locale'
|
||||
|
||||
export function LastUpdateAt({ date }: {
|
||||
date: Date
|
||||
}) {
|
||||
return (
|
||||
<div className='flex md:justify-end px-4 md:h-0'>
|
||||
<span className='text-sm text-border md:whitespace-pre-wrap md:text-right'>
|
||||
Последнее обновление:{'\n'}{formatDistanceStrict(date, Date.now(), { locale: dateFnsRuLocale, addSuffix: true })}
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user