|
@@ -88,6 +88,14 @@ class ReactMixin:
|
|
|
|
|
|
def handle_react(self, request: Request, **kwargs) -> HttpResponse:
|
|
|
org_context = getattr(self, "active_organization", None)
|
|
|
+ react_config = get_client_config(request, org_context)
|
|
|
+
|
|
|
+ user_theme = ""
|
|
|
+ if react_config.get("user", None) and react_config["user"].get("options", {}).get(
|
|
|
+ "theme", None
|
|
|
+ ):
|
|
|
+ user_theme = f"theme-{react_config['user']['options']['theme']}"
|
|
|
+
|
|
|
context = {
|
|
|
"CSRF_COOKIE_NAME": settings.CSRF_COOKIE_NAME,
|
|
|
"meta_tags": [
|
|
@@ -100,7 +108,8 @@ class ReactMixin:
|
|
|
# Since we already have it here from the OrganizationMixin, we can
|
|
|
# save some work and render it faster.
|
|
|
"org_context": org_context,
|
|
|
- "react_config": get_client_config(request, org_context),
|
|
|
+ "react_config": react_config,
|
|
|
+ "user_theme": user_theme,
|
|
|
}
|
|
|
|
|
|
# Force a new CSRF token to be generated and set in user's
|