about summary refs log tree commit diff
path: root/frontend/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/main.rs')
-rw-r--r--frontend/src/main.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/frontend/src/main.rs b/frontend/src/main.rs
index fd5ef3c..7f73cf7 100644
--- a/frontend/src/main.rs
+++ b/frontend/src/main.rs
@@ -9,17 +9,19 @@ use app::OSSE;
 enum Route {
     #[at("/")]
     OSSEHome,
+    #[at("/search/")]
+    OSSEHomeEmptySearch,
     #[at("/search/:query")]
     OSSESearch { query: String },
 }
 
 fn switch_routes(routes: Route) -> Html {
     match routes {
-        Route::OSSEHome => html! {
-            <OSSE api_endpoint={"http://127.0.0.1:4444"}/>
+        Route::OSSEHome | Route::OSSEHomeEmptySearch => html! {
+            <OSSE api_endpoint={"http://127.0.0.1:4444"} initial_search_query={None as Option<String>} />
         },
         Route::OSSESearch { query } => html! {
-            <OSSE api_endpoint={"http://127.0.0.1:4444"}/>
+            <OSSE api_endpoint={"http://127.0.0.1:4444"} initial_search_query={Some(query)} />
         },
     }
 }