Skip to content

Commit

Permalink
Update routes
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveCookTU committed Sep 3, 2024
1 parent 4ef0b5d commit ec625cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ pub fn app() -> impl IntoView {
view! {
<Router>
<Routes>
<Route path="" view= move || view! {
<main class="my-0 mx-auto max-w-3xl text-center">
<h2 class="p-6 text-4xl">"Welcome to the Sports Time Puller"</h2>
<p class="px-10 pb-10 text-center">"Click an option on the navigation bar above to get started."</p>
</main>
}/>
</Routes>
<Routes base={"sports_time_puller".to_string()}>
<Route path="" view= move || view! {
<main class="my-0 mx-auto max-w-3xl text-center">
<h2 class="p-6 text-4xl">"Welcome to the Sports Time Puller"</h2>
Expand Down
8 changes: 4 additions & 4 deletions src/components/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ pub fn Common() -> impl IntoView {
view! {
<div>
<div class="flex bg-gray-500 h-16 w-screen drop-shadow-xl justify-around items-center">
<a class="nav-button" href="/cfb">"CFB"</a>
<a class="nav-button" href="/mlb">"MLB"</a>
<a class="nav-button" href="/nhl">"NHL"</a>
<a class="nav-button" href="/soccer">"Soccer"</a>
<a class="nav-button" href="/sports_time_puller/cfb">"CFB"</a>
<a class="nav-button" href="/sports_time_puller/mlb">"MLB"</a>
<a class="nav-button" href="/sports_time_puller/nhl">"NHL"</a>
<a class="nav-button" href="/sports_time_puller/soccer">"Soccer"</a>
</div>
<App />
</div>
Expand Down

0 comments on commit ec625cf

Please sign in to comment.