Skip to content

Commit d4fd22f

Browse files
committed
fix app root
1 parent adfc980 commit d4fd22f

File tree

8 files changed

+146
-212
lines changed

8 files changed

+146
-212
lines changed

reflex/compiler/compiler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _compile_document_root(root: Component) -> str:
5353
"""
5454
document_root_imports = root._get_all_imports()
5555
_apply_common_imports(document_root_imports)
56-
return templates.DOCUMENT_ROOT.render(
56+
return templates._document_root_template(
5757
imports=utils.compile_imports(document_root_imports),
5858
document=root.render(),
5959
)
@@ -93,7 +93,7 @@ def _compile_app(app_root: Component) -> str:
9393
app_root_imports = app_root._get_all_imports()
9494
_apply_common_imports(app_root_imports)
9595

96-
return templates.APP_ROOT.render(
96+
return templates._app_root_template(
9797
imports=utils.compile_imports(app_root_imports),
9898
custom_codes=app_root._get_all_custom_code(),
9999
hooks=app_root._get_all_hooks(),
@@ -112,7 +112,7 @@ def _compile_theme(theme: str) -> str:
112112
Returns:
113113
The compiled theme.
114114
"""
115-
return templates.THEME.render(theme=theme)
115+
return templates._theme_template(theme=theme)
116116

117117

118118
def _compile_contexts(state: type[BaseState] | None, theme: Component | None) -> str:

0 commit comments

Comments
 (0)