Skip to content

Commit 5a0cbde

Browse files
authored
update reflex dep to 078 (#84)
* update reflex dep to 078 * don't use get decorated pages * make it inside the function instead of outside
1 parent bb6cab6 commit 5a0cbde

File tree

24 files changed

+46
-41
lines changed

24 files changed

+46
-41
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
reflex>=0.7.7
1+
reflex>=0.7.8
22
python-dateutil>=2.9.0

admin_dashboard/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
reflex>=0.7.4
1+
reflex>=0.7.8

ai_image_gen/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
reflex>=0.5.5
1+
reflex>=0.7.8
22
replicate==0.26.0
33
reflex-img-comparison-slider>=0.0.1
44
requests

api_admin_panel/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
reflex>=0.6.0a
1+
reflex>=0.7.8
22
reflex-chakra
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
reflex>=0.7.4
1+
reflex>=0.7.8
22
faker>=37.1.0

ci_template/cijob/components/navbar.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ def navbar_footer() -> rx.Component:
102102

103103

104104
def menu_button() -> rx.Component:
105-
# Get all the decorated pages and add them to the menu.
106-
from reflex.page import get_decorated_pages
105+
from cijob.templates.template import ALL_PAGES
107106

108107
# The ordered page routes.
109108
ordered_page_routes = [
@@ -112,12 +111,9 @@ def menu_button() -> rx.Component:
112111
"/settings",
113112
]
114113

115-
# Get the decorated pages.
116-
pages = get_decorated_pages()
117-
118114
# Include all pages even if they are not in the ordered_page_routes.
119115
ordered_pages = sorted(
120-
pages,
116+
ALL_PAGES,
121117
key=lambda page: (
122118
ordered_page_routes.index(page["route"])
123119
if page["route"] in ordered_page_routes

ci_template/cijob/components/sidebar.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,18 @@ def sidebar() -> rx.Component:
129129
The sidebar component.
130130
131131
"""
132-
# Get all the decorated pages and add them to the sidebar.
133-
from reflex.page import get_decorated_pages
132+
from cijob.templates.template import ALL_PAGES
134133

135134
# The ordered page routes.
136135
ordered_page_routes = [
137136
"/",
138137
"/about",
139138
"/settings",
140139
]
141-
# Get the decorated pages.
142-
pages = get_decorated_pages()
143140

144141
# Include all pages even if they are not in the ordered_page_routes.
145142
ordered_pages = sorted(
146-
pages,
143+
ALL_PAGES,
147144
key=lambda page: (
148145
ordered_page_routes.index(page["route"])
149146
if page["route"] in ordered_page_routes

ci_template/cijob/templates/template.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ class ThemeState(rx.State):
4646
scaling: str = "100%"
4747

4848

49+
ALL_PAGES = []
50+
51+
4952
def template(
5053
route: str | None = None,
5154
title: str | None = None,
@@ -134,6 +137,13 @@ def theme_wrap():
134137
scaling=ThemeState.scaling,
135138
)
136139

140+
ALL_PAGES.append(
141+
{
142+
"route": route,
143+
"title": title,
144+
}
145+
)
146+
137147
return theme_wrap
138148

139149
return decorator

ci_template/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
reflex>=0.5.4
1+
reflex>=0.7.8

company_dashboard/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
reflex>=0.7.7
1+
reflex>=0.7.8
22
faker>=37.0.0

0 commit comments

Comments
 (0)