Added debug for selfserve (#623)
This commit is contained in:
parent
0f88176a27
commit
9c6178d0ed
|
@ -109,6 +109,16 @@ const handleMessage = async (event: MessageEvent): Promise<void> => {
|
|||
subscriptionId: inputs.subscriptionId,
|
||||
});
|
||||
|
||||
if (i18n.isInitialized) {
|
||||
await displaySelfServeComponent(selfServeType);
|
||||
} else {
|
||||
i18n.on("initialized", async () => {
|
||||
await displaySelfServeComponent(selfServeType);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const displaySelfServeComponent = async (selfServeType: SelfServeType): Promise<void> => {
|
||||
const descriptor = await getDescriptor(selfServeType);
|
||||
ReactDOM.render(renderComponent(descriptor), document.getElementById("selfServeContent"));
|
||||
};
|
||||
|
|
|
@ -8,14 +8,15 @@ i18n
|
|||
.init({
|
||||
fallbackLng: "en",
|
||||
detection: { order: ["navigator", "cookie", "localStorage", "sessionStorage", "querystring", "htmlTag"] },
|
||||
debug: process.env.NODE_ENV === "development",
|
||||
// temporarily setting debug to true to investigate loading issues in prod
|
||||
debug: true,
|
||||
keySeparator: ".",
|
||||
interpolation: {
|
||||
formatSeparator: ",",
|
||||
},
|
||||
react: {
|
||||
wait: true,
|
||||
bindI18n: "languageChanged loaded",
|
||||
bindI18n: "languageChanged added loaded",
|
||||
bindI18nStore: "added removed",
|
||||
nsMode: "default",
|
||||
useSuspense: false,
|
||||
|
|
Loading…
Reference in New Issue