diff --git a/src/pages/unauthenticated_page.rs b/src/pages/unauthenticated_page.rs index 623a64d..79389c1 100644 --- a/src/pages/unauthenticated_page.rs +++ b/src/pages/unauthenticated_page.rs @@ -1,20 +1,34 @@ +use leptos::leptos_dom::logging::console_log; use leptos::prelude::*; -use leptos_oidc::{LoginLink}; +use leptos_oidc::{AuthSignal}; use crate::components::ActionButton; #[component] pub fn UnauthenticatedPage() -> impl IntoView { + let auth = use_context::().expect("AuthSignal not present in LoginLink"); + let login_url = move || { + auth.with(|auth| { + auth.unauthenticated() + .map(|unauthenticated| unauthenticated.login_url()) + }) + }; + + let navigate = leptos_router::hooks::use_navigate(); + view! (

"You're not signed in. Please sign in with your Region 15 email."

- + + "Sign in" +
- ) } \ No newline at end of file