Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENG-3824]Make AI template use light mode #3963

Merged
merged 1 commit into from
Sep 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions reflex/utils/prerequisites.py
Original file line number Diff line number Diff line change
Expand Up @@ -1481,13 +1481,20 @@ def replace_content(_match):

main_module_path = Path(app_name, app_name + constants.Ext.PY)
main_module_code = main_module_path.read_text()
main_module_path.write_text(
re.sub(
r"def index\(\).*:\n([^\n]\s+.*\n+)+",
replace_content,
main_module_code,
)

main_module_code = re.sub(
r"def index\(\).*:\n([^\n]\s+.*\n+)+",
replace_content,
main_module_code,
)
# Make the app use light mode until flexgen enforces the conversion of
# tailwind colors to radix colors.
main_module_code = re.sub(
r"app\s*=\s*rx\.App\(\s*\)",
'app = rx.App(theme=rx.theme(color_mode="light"))',
main_module_code,
)
main_module_path.write_text(main_module_code)


def format_address_width(address_width) -> int | None:
Expand Down
Loading