feat: simplify tab code slightly

This commit is contained in:
alphafetus committed 2026-01-31 15:00:13 -05:00
1 parent b21887f82b
commit b4f7ff6382
6 files changed
+62 -38

No files matched your search

+9 -6
View File
@@ -14,12 +14,15 @@ pub fn AdminShell() -> impl IntoView {
<AdminLoginContext>
<Banner title="R15 Scholarships Admin" logo="/PHS_Stacked_Acronym.png" />
// We'll put the tabs here.
<TabSidebarList tabs=vec![
TabInfo::new("Home", "/admin/home", None),
TabInfo::new("Providers", "/admin/providers", None),
TabInfo::new("Scholarships", "/admin/scholarships", None),
TabInfo::new("Utilities", "/admin/utilities", None),
] />
<TabSidebarList
base_path="admin"
tabs=vec![
TabInfo::new("Home", "home", None),
TabInfo::new("Providers", "providers", None),
TabInfo::new("Scholarships", "scholarships", None),
TabInfo::new("Utilities", "utilities", None),
]
/>
</AdminLoginContext>
}
}
+13
View File
@@ -0,0 +1,13 @@
use leptos::prelude::*;
#[component]
pub fn StudentAthleticsPage() -> impl IntoView {
view! {
<div class="flex flex-1 flex-col gap-4 items-center m-4">
<div class="font-bold text-3xl">"Student Athletics Form"</div>
<div class="text-lg">
"This is just a placeholder for now. This will display the athletics form."
</div>
</div>
}
}
+3 -1
View File
@@ -2,8 +2,10 @@ mod shell;
mod home_page;
mod demographics_page;
mod additional_page;
mod athletics_page;
pub use shell::*;
pub use home_page::*;
pub use demographics_page::*;
pub use additional_page::*;
pub use additional_page::*;
pub use athletics_page::*;
+16 -13
View File
@@ -13,19 +13,22 @@ pub fn StudentShell() -> impl IntoView {
<Banner title="R15 Student Scholarship Application" logo="/PHS_Stacked_Acronym.png" />
<AuthLoaded fallback=Loading>
<Authenticated unauthenticated=UnauthenticatedPage>
<TabSidebarList tabs=vec![
TabInfo::new("Home", "/students/home", None),
TabInfo::new("Demographics", "/students/demographics",
Some(vec![
SubTabInfo::new("Testing", "/students/testing"),
SubTabInfo::new("Testing Again!", "/students/testing/again")
])),
TabInfo::new("Additional Info", "/students/additional",
Some(vec![
SubTabInfo::new("Testing", "/students/testing"),
SubTabInfo::new("Testing Again!", "/students/testing/again")
])),
] />
<TabSidebarList
base_path="students"
tabs=vec![
TabInfo::new("Home", "home", None),
TabInfo::new("Demographics", "demographics", None),
TabInfo::new("Additional Info", "additional",
Some(vec![
SubTabInfo::new("Academics", "academics"),
SubTabInfo::new("Athletics", "athletics"),
SubTabInfo::new("Work Experience", "work-experience"),
SubTabInfo::new("Extracurriculars", "extracurriculars"),
SubTabInfo::new("University Info", "university"),
SubTabInfo::new("Parent Info", "parent-info")
])),
]
/>
</Authenticated>
</AuthLoaded>
</StudentLoginContext>