Added last update, cache strategy, telegram fail notifications, teachers photos

This commit is contained in:
VityaSchel
2023-10-02 18:54:26 +04:00
parent f6daee6201
commit 755654cf9d
19 changed files with 579 additions and 124 deletions

View 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>
)
}