use crate::components::ToastList;
use crate::components::login::ProviderLoginContext;
use crate::pages::{AdminApplicantsPageFallback, AdminApplicantsPageShell, AdminApplicantsStudentList, AdminHomePage, AdminProviderPage, AdminScholarshipPage, AdminShell, AdminUtilsPage, ApplicantsPageFallback, ApplicantsStudentList, AuthCallbackPage, LoanerBorrowForm, LoanerFallback, LoanerReturnForm, LoanerShell, ProviderContactPage, ProviderPortal, ScholarshipInfoPage};
use crate::pages::{ApplicantsPageShell, student};
use leptos::prelude::*;
use leptos_meta::{MetaTags, Stylesheet, Title, provide_meta_context};
use leptos_oidc::AuthSignal;
use leptos_router::any_nested_route::IntoAnyNestedRoute;
use leptos_router::{
MatchNestedRoutes,
components::{ParentRoute, Route, Router, Routes},
path,
};
pub fn shell(options: LeptosOptions) -> impl IntoView {
view! {
}
}
#[component]
pub fn App() -> impl IntoView {
// Provides context that manages stylesheets, titles, meta tags, etc.
provide_meta_context();
view! {
// injects a stylesheet into the document
// id=leptos means cargo-leptos will hot-reload this stylesheet
// sets the document title
// content for this welcome page
}
}
#[component]
pub fn AppWithRoutes() -> impl IntoView {
provide_meta_context();
view! {
// injects a stylesheet into the document
// id=leptos means cargo-leptos will hot-reload this stylesheet
// sets the document title
// TODO Create a 404 page
//
}
}
#[component(transparent)]
fn ProviderRoutes() -> impl MatchNestedRoutes + Clone {
view! {
//
}
.into_inner()
.into_any_nested_route()
}
#[component(transparent)]
fn LoanerRoutes() -> impl MatchNestedRoutes + Clone {
view! {
}
.into_inner()
.into_any_nested_route()
}
#[component(transparent)]
fn AdminRoutes() -> impl MatchNestedRoutes + Clone {
view! {
}
.into_inner()
.into_any_nested_route()
}
#[component(transparent)]
fn StudentRoutes() -> impl MatchNestedRoutes + Clone {
view! {
}
.into_inner()
.into_any_nested_route()
}
#[component]
pub fn AuthErrorView() -> impl IntoView {
let auth = use_context::().expect("AuthError: RwSignal was not found");
let error_message = move || auth.get().error().map(|error| format!("{error:?}"));
view! {
"An authentication error occurred."
{error_message}
}
}