diff --git a/Readme.md b/Readme.md index c767205..644aad9 100644 --- a/Readme.md +++ b/Readme.md @@ -23,4 +23,5 @@ - [x] Make the navbar logo bigger - [x] Finish agents screen - [ ] Finish Contact us screen -- [ ] Link agent info with details screen, remove hardcoded pic and details \ No newline at end of file +- [ ] Link agent info with details screen, remove hardcoded pic and details +- [ ] Whatsapp button should direct to agent's phone number wa.me link \ No newline at end of file diff --git a/css/components/floating_widget.css b/css/components/floating_widget.css index 0fc6a3e..c77cc58 100644 --- a/css/components/floating_widget.css +++ b/css/components/floating_widget.css @@ -10,6 +10,7 @@ background-color: #25D366; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); font-size: 45px; + text-decoration: none; } .floating-widget-container:hover { diff --git a/src/components/floating_widget.rs b/src/components/floating_widget.rs index 42de77d..8332eaf 100644 --- a/src/components/floating_widget.rs +++ b/src/components/floating_widget.rs @@ -1,18 +1,23 @@ +use uuid::Uuid; use yew::prelude::*; //TODO: Finish, add whatsapp link or email link? #[function_component(FloatingWidget)] -pub fn floating_widget(_props: &FloatingWidgetProps) -> Html { +pub fn floating_widget(props: &FloatingWidgetProps) -> Html { + let message = format!("Buenas, me interesa conocer mas sobre esta propiedad: %0A https://proyectosenconstruccion.com/details/{}", props.project_id); + let number = format!("1{}", props.phone_number); + let wa_me_url = format!("https://wa.me/{number}/?text={message}"); html! { -
+ } } #[derive(Properties, PartialEq)] pub struct FloatingWidgetProps { - + pub project_id: Uuid, + pub phone_number: String, } \ No newline at end of file diff --git a/src/pages/details.rs b/src/pages/details.rs index 2cafd3e..60b8a88 100644 --- a/src/pages/details.rs +++ b/src/pages/details.rs @@ -54,7 +54,7 @@ pub fn details_page(props: &DetailsPageProps) -> Html { html!{ <>