Use "custom parse format" dayjs plugin
Without this plugin the formatted date was shown as "Invalid date"
This commit is contained in:
@@ -8,12 +8,16 @@
|
|||||||
|
|
||||||
import { StrictMode } from 'react';
|
import { StrictMode } from 'react';
|
||||||
import { createRoot } from 'react-dom/client';
|
import { createRoot } from 'react-dom/client';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
||||||
import { App } from '@/App';
|
import { App } from '@/App';
|
||||||
import '@/index.css';
|
import '@/index.css';
|
||||||
// roboto font
|
// roboto font
|
||||||
import '@fontsource/roboto';
|
import '@fontsource/roboto';
|
||||||
import { defaultPromiseErrorHandler } from '@/util/defaultPromiseErrorHandler.ts';
|
import { defaultPromiseErrorHandler } from '@/util/defaultPromiseErrorHandler.ts';
|
||||||
|
|
||||||
|
dayjs.extend(customParseFormat);
|
||||||
|
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
navigator.serviceWorker.ready.then((registration) => {
|
navigator.serviceWorker.ready.then((registration) => {
|
||||||
registration.unregister().catch(defaultPromiseErrorHandler('unregister service workers'));
|
registration.unregister().catch(defaultPromiseErrorHandler('unregister service workers'));
|
||||||
|
|||||||
Reference in New Issue
Block a user