Extract date fns setup
This commit is contained in:
parent
a2568a41f3
commit
5d664656a2
4 changed files with 27 additions and 27 deletions
|
@ -1,9 +1,8 @@
|
|||
import { initializeSite } from "@utils/app";
|
||||
import setDefaultOptions from "date-fns/setDefaultOptions";
|
||||
import { initializeSite, setupI18Next as setupDateFns } from "@utils/app";
|
||||
import { hydrate } from "inferno-hydrate";
|
||||
import { Router } from "inferno-router";
|
||||
import { App } from "../shared/components/app/app";
|
||||
import { HistoryService, I18NextService } from "../shared/services";
|
||||
import { HistoryService } from "../shared/services";
|
||||
|
||||
import "bootstrap/js/dist/collapse";
|
||||
import "bootstrap/js/dist/dropdown";
|
||||
|
@ -11,17 +10,7 @@ import "bootstrap/js/dist/dropdown";
|
|||
async function startClient() {
|
||||
initializeSite(window.isoData.site_res);
|
||||
|
||||
const lang = I18NextService.i18n.language;
|
||||
const locale = (
|
||||
await import(
|
||||
/* webpackExclude: /\.js\.flow$/ */
|
||||
`date-fns/locale/${lang}`
|
||||
)
|
||||
).default;
|
||||
|
||||
setDefaultOptions({
|
||||
locale,
|
||||
});
|
||||
await setupDateFns();
|
||||
|
||||
const wrapper = (
|
||||
<Router history={HistoryService.history}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue