Use "custom parse format" dayjs plugin

Without this plugin the formatted date was shown as "Invalid date"
This commit is contained in:
schroda
2024-05-02 22:14:08 +02:00
parent dc9d9dfa3f
commit fc9a849c1b

View File

@@ -8,12 +8,16 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import dayjs from 'dayjs';
import customParseFormat from 'dayjs/plugin/customParseFormat';
import { App } from '@/App';
import '@/index.css';
// roboto font
import '@fontsource/roboto';
import { defaultPromiseErrorHandler } from '@/util/defaultPromiseErrorHandler.ts';
dayjs.extend(customParseFormat);
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then((registration) => {
registration.unregister().catch(defaultPromiseErrorHandler('unregister service workers'));