Skip to content

Commit

Permalink
remove ph for now (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
evisdrenova authored Apr 7, 2024
1 parent e116526 commit 3fe5564
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 53 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "neosync",
"homepage": "https://neosync.dev",
"version": "1.0.5",
"version": "1.0.6",
"description": "Auth templates for Neosync Cloud",
"repository": {
"type": "git",
Expand Down
37 changes: 0 additions & 37 deletions src/PosthogProvider.tsx

This file was deleted.

27 changes: 12 additions & 15 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,27 @@ import { StrictMode, Suspense, lazy } from "react";
import { createRoot } from "react-dom/client";
import { kcContext as kcAccountThemeContext } from "./account/kcContext";
import { kcContext as kcLoginThemeContext } from "./login/kcContext";
import PHProvider from "./PosthogProvider";

const KcLoginThemeApp = lazy(() => import("./login/KcApp"));
const KcAccountThemeApp = lazy(() => import("./account/KcApp"));

createRoot(document.getElementById("root")!).render(
<StrictMode>
<Suspense>
<PHProvider>
{(() => {
if (kcLoginThemeContext !== undefined) {
return <KcLoginThemeApp kcContext={kcLoginThemeContext} />;
}
{(() => {
if (kcLoginThemeContext !== undefined) {
return <KcLoginThemeApp kcContext={kcLoginThemeContext} />;
}

if (kcAccountThemeContext !== undefined) {
return <KcAccountThemeApp kcContext={kcAccountThemeContext} />;
}
if (kcAccountThemeContext !== undefined) {
return <KcAccountThemeApp kcContext={kcAccountThemeContext} />;
}

throw new Error(
"This app is a Keycloak theme" +
"It isn't meant to be deployed outside of Keycloak"
);
})()}
</PHProvider>
throw new Error(
"This app is a Keycloak theme" +
"It isn't meant to be deployed outside of Keycloak"
);
})()}
</Suspense>
</StrictMode>
);

0 comments on commit 3fe5564

Please sign in to comment.