aboutsummaryrefslogtreecommitdiff
path: root/src/components/navbar
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-30 15:15:31 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-30 15:15:31 +0530
commit0d7d20829623b14c8ea5284bc24e63f7c31d61b7 (patch)
treed918be383306e88e659162f5bd5fc8249de885b6 /src/components/navbar
parenta1b3b7fb92fae98e9f6df7b9d4e3e3b4ff6b1a44 (diff)
renamed client to customer
Diffstat (limited to 'src/components/navbar')
-rw-r--r--src/components/navbar/nav.rs20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/components/navbar/nav.rs b/src/components/navbar/nav.rs
index dd215a0..5249b60 100644
--- a/src/components/navbar/nav.rs
+++ b/src/components/navbar/nav.rs
@@ -17,6 +17,7 @@
use yew::prelude::*;
use yew_router::prelude::*;
+use gloo::utils::document;
use crate::app::Route;
use crate::components::navbar::nav_link::NavLink;
@@ -58,8 +59,8 @@ pub fn nav() -> Html {
to: Route::Home,
},
Link {
- label: String::from("Clients"),
- to: Route::ManageClients,
+ label: String::from("Customers"),
+ to: Route::ManageCustomers,
},
Link {
label: String::from("Brands"),
@@ -76,7 +77,7 @@ pub fn nav() -> Html {
]);
let links_html: Html = match current_route {
- Route::ManageClients
+ Route::ManageCustomers
| Route::ManageBrands
| Route::ManageItems
| Route::ManageInvoices => manage_links,
@@ -86,6 +87,19 @@ pub fn nav() -> Html {
.map(|link| html!(<NavLink label={link.label.clone()} to={link.to.clone()} />))
.collect();
+ // set document title
+ document().set_title(match current_route {
+ Route::Home => "",
+
+ Route::ManageMenu => "Manage OpenBills Data",
+ Route::ManageCustomers => "Manage OpenBills Customers",
+ Route::ManageBrands => "Manage OpenBills Brands",
+ Route::ManageItems => "Manage OpenBills Items",
+ Route::ManageInvoices => "Manage OpenBills Invoices",
+
+ _ => "Hello World",
+ });
+
html! {
<nav>
{links_html}