Skip to content

Commit 6ff9209

Browse files
49 - Rendering Related Data
1 parent 4d87795 commit 6ff9209

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

full_stack_python/auth/state.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def authenticated_user_info(self) -> UserInfo | None:
3434
).one_or_none()
3535
if result is None:
3636
return None
37+
# database lookup
38+
result.user
3739
# user_obj = result.user
3840
# print(result.user)
3941
return result

full_stack_python/full_stack_python.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ def did_click(self):
2828

2929
def index() -> rx.Component:
3030
# Welcome Page (Index)
31+
my_user_obj = SessionState.authenticated_user_info
3132
my_child = rx.vstack(
3233
rx.heading(State.label, size="9"),
34+
rx.text(my_user_obj.to_string()),
35+
rx.text(my_user_obj.user.username),
3336
rx.text(
3437
"Get started by editing ",
3538
rx.code(f"{config.app_name}/{config.app_name}.py"),

full_stack_python/ui/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def base_layout_component(child, *args, **kwargs) -> rx.Component:
1616
),
1717
rx.logo(),
1818
rx.color_mode.button(position="bottom-left"),
19-
padding='10em',
20-
id="my-base-container"
19+
# padding='10em',
20+
# id="my-base-container"
2121
)
2222

2323
def base_page(child: rx.Component, *args, **kwargs) -> rx.Component:

full_stack_python/ui/dashboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ def base_dashboard_page(child: rx.Component, *args, **kwargs) -> rx.Component:
2020

2121
),
2222
# rx.color_mode.button(position="bottom-left"),
23-
padding='10em',
24-
id="my-base-container"
23+
# padding='10em',
24+
# id="my-base-container"
2525
)

0 commit comments

Comments
 (0)