From 6f590fdf1262027ed887e3f26818f8205ec87c81 Mon Sep 17 00:00:00 2001 From: Scoder12 <34356756+Scoder12@users.noreply.github.com> Date: Mon, 3 Aug 2020 17:35:43 -0700 Subject: [PATCH] Bugfix: Use signin() for needs_sign_in default Without this, sign in button was created in page head making it invisible --- src/replit/maqpy/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/replit/maqpy/utils.py b/src/replit/maqpy/utils.py index 3537cb8..1c37566 100644 --- a/src/replit/maqpy/utils.py +++ b/src/replit/maqpy/utils.py @@ -26,7 +26,10 @@ def sign_in(title: str = "Please Sign In") -> Page: return Page(title=title, body=sign_in_snippet) -def needs_signin(func: Callable = None, login_html: str = sign_in_snippet) -> Callable: +sign_in_page = sign_in() + + +def needs_sign_in(func: Callable = None, login_res: str = sign_in_page) -> Callable: """A decorator that enforces that the user is signed in before accessing the page. Args: