Skip to content

Commit

Permalink
Fixed date picker provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarik Huber authored and Tarik Huber committed Jun 26, 2023
1 parent 5497100 commit 38fff11
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/rmw-shell/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/rmw-shell/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rmw-shell",
"version": "11.2.22",
"version": "11.2.23",
"description": "React template with Material UI, Firebase, routing...",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import { initializeApp, getApps, getApp } from "firebase/app";
import { getAuth, onAuthStateChanged } from "firebase/auth";
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
import { AdapterMoment as DateAdapter } from "@mui/x-date-pickers/AdapterMoment";
import { useLocale } from "base-shell/lib/providers/Locale";

export default function ({ children }) {
const { appConfig } = useConfig();
const auth = useAuth();
const { firebase: firebaseConfig, auth: authConfig = {} } = appConfig || {};
const { prod = {}, dev = {} } = firebaseConfig || {};
const { onAuthStateChanged: internalOnAuthStateChanged } = authConfig || {};
const { locale = "en" } = useLocale();

if (getApps().length === 0) {
initializeApp(
Expand Down Expand Up @@ -46,7 +48,10 @@ export default function ({ children }) {
<ColsProvider>
<StorageProvider>
<MessagingProvider>
<LocalizationProvider dateAdapter={DateAdapter}>
<LocalizationProvider
dateAdapter={DateAdapter}
adapterLocale={locale}
>
{children}
</LocalizationProvider>
</MessagingProvider>
Expand Down

0 comments on commit 38fff11

Please sign in to comment.