about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-11-01 20:19:12 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-11-01 20:19:12 +0100
commit44effa4f24bdf333ce7437bc08daa72bae39b75f (patch)
treee3df8df0e45310dc1a0c99d30a955a557269a1a7
parentFrontend: Reduce code duplication in the initial_search_query path of compone... (diff)
downloadOSSE-44effa4f24bdf333ce7437bc08daa72bae39b75f.tar.gz
OSSE-44effa4f24bdf333ce7437bc08daa72bae39b75f.tar.bz2
OSSE-44effa4f24bdf333ce7437bc08daa72bae39b75f.zip
Frontend: Result component: Add basic structure
-rw-r--r--frontend/src/app.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/frontend/src/app.rs b/frontend/src/app.rs
index 03f466d..d4ef37c 100644
--- a/frontend/src/app.rs
+++ b/frontend/src/app.rs
@@ -15,10 +15,14 @@ pub struct ResultComponentProps {
 #[function_component(ResultComponent)]
 fn result_component(props: &ResultComponentProps) -> Html {
     html! {
-        <div>
+        <div class="my-5">
             <a href={props.result.url.clone()}>
-                {props.result.url.clone()}{"--"}{props.result.title.clone()}{"----"}{props.result.description.clone()}{format!("PRIO: {}", props.result.priority)}
+                <p class="text-muted">{props.result.url.clone()}</p>
+                <p>{props.result.title.clone()}</p>
             </a>
+            <p>//No description if no description
+                {props.result.description.clone()}{format!("PRIO: {}", props.result.priority)}
+            </p>
         </div>
     }
 }
@@ -34,7 +38,6 @@ pub struct OSSEProps {
     pub initial_search_query: Option<String>,
 }
 
-//TODO: Error
 pub enum OSSEMessage {
     SearchSubmitted,
     SearchChanged(String),