Skip to content

Commit

Permalink
Refine menu button
Browse files Browse the repository at this point in the history
  • Loading branch information
daya0576 committed Nov 24, 2024
1 parent a965a1a commit 7ebf075
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions beaverhabits/frontend/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def menu_component(root_path: str) -> None:
"""Dropdown menu for the top-right corner of the page."""
with ui.menu():
compat_menu("Add", lambda: redirect("add"))
# compat_menu("Sort", lambda: redirect("order"))
ui.separator()
compat_menu("Sort", lambda: redirect("order"))
ui.separator()

compat_menu("Export", lambda: open_tab("export"))
Expand Down Expand Up @@ -86,8 +87,6 @@ def layout(title: str | None = None, with_menu: bool = True):
ui.space()
if "order" in path:
menu_icon_button(icons.ADD, click=lambda: redirect("add"))
if "add" in path:
menu_icon_button("drag_indicator", click=lambda: redirect("order"))
# elif "/habits/{habit_id}" in path:
# menu_icon_button(icons.EDIT, click=lambda: redirect("edit"))
with menu_icon_button(icons.MENU):
Expand Down

0 comments on commit 7ebf075

Please sign in to comment.