fix: move _toggle_offcanvas callback to _compte_shell.py

The callback was defined in compte_admin.py but controlled components
(compte-offcanvas and compte-offcanvas-open) rendered by account_shell()
in _compte_shell.py. Moving the callback to where the components live
improves code organization and reduces coupling.

Closes #73

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Colin Maudry
2026-06-24 22:10:01 +02:00
parent 95f7d80b45
commit e2124024e1
2 changed files with 11 additions and 11 deletions
-10
View File
@@ -206,13 +206,3 @@ def layout(
)
def _toggle_delete_modal(_open, _cancel, is_open):
return not is_open
@callback(
Output("compte-offcanvas", "is_open"),
Input("compte-offcanvas-open", "n_clicks"),
State("compte-offcanvas", "is_open"),
prevent_initial_call=True,
)
def _toggle_offcanvas(_n, is_open):
return not is_open