From 503d90eeb1d62429d90faf1a561dd13ef0f22625 Mon Sep 17 00:00:00 2001 From: Franklin Date: Wed, 10 May 2023 17:15:16 -0400 Subject: [PATCH] Cargo fmt --- src/api/mod.rs | 1 + src/components/footer.rs | 6 ++---- src/components/mod.rs | 4 ++-- src/components/navbar.rs | 1 + src/components/page/agency.rs | 2 +- src/components/page/contact.rs | 6 ++---- src/components/page/hero.rs | 2 +- src/components/page/mod.rs | 4 ++-- src/components/page/results.rs | 6 ++---- src/components/page/search.rs | 6 ++---- src/main.rs | 7 +++---- src/pages/admin_panel.rs | 6 ++---- src/pages/main_page.rs | 10 ++++++++-- src/pages/mod.rs | 1 - src/pages/not_found.rs | 2 +- src/utils/mod.rs | 1 + 16 files changed, 31 insertions(+), 34 deletions(-) diff --git a/src/api/mod.rs b/src/api/mod.rs index e69de29..8b13789 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -0,0 +1 @@ + diff --git a/src/components/footer.rs b/src/components/footer.rs index 0030b76..1a5dc2e 100644 --- a/src/components/footer.rs +++ b/src/components/footer.rs @@ -2,7 +2,5 @@ use yew::prelude::*; #[function_component(Footer)] pub fn footer() -> Html { - html! { - - } -} \ No newline at end of file + html! {} +} diff --git a/src/components/mod.rs b/src/components/mod.rs index 49bfe2d..cde7024 100644 --- a/src/components/mod.rs +++ b/src/components/mod.rs @@ -1,3 +1,3 @@ -pub mod page; pub mod footer; -pub mod navbar; \ No newline at end of file +pub mod navbar; +pub mod page; diff --git a/src/components/navbar.rs b/src/components/navbar.rs index e69de29..8b13789 100644 --- a/src/components/navbar.rs +++ b/src/components/navbar.rs @@ -0,0 +1 @@ + diff --git a/src/components/page/agency.rs b/src/components/page/agency.rs index f94a3b4..2cb4c5d 100644 --- a/src/components/page/agency.rs +++ b/src/components/page/agency.rs @@ -16,4 +16,4 @@ pub fn agency_section() -> Html { } -} \ No newline at end of file +} diff --git a/src/components/page/contact.rs b/src/components/page/contact.rs index 51099fe..5bde376 100644 --- a/src/components/page/contact.rs +++ b/src/components/page/contact.rs @@ -2,7 +2,5 @@ use yew::prelude::*; #[function_component(ContactSection)] pub fn contact_section() -> Html { - html! { - - } -} \ No newline at end of file + html! {} +} diff --git a/src/components/page/hero.rs b/src/components/page/hero.rs index 2d5272b..e97afe4 100644 --- a/src/components/page/hero.rs +++ b/src/components/page/hero.rs @@ -26,4 +26,4 @@ pub fn hero_section() -> Html { } -} \ No newline at end of file +} diff --git a/src/components/page/mod.rs b/src/components/page/mod.rs index 5cfafe1..fbef23a 100644 --- a/src/components/page/mod.rs +++ b/src/components/page/mod.rs @@ -1,5 +1,5 @@ -pub mod hero; pub mod agency; pub mod contact; +pub mod hero; pub mod results; -pub mod search; \ No newline at end of file +pub mod search; diff --git a/src/components/page/results.rs b/src/components/page/results.rs index c02bd8f..ae21dfe 100644 --- a/src/components/page/results.rs +++ b/src/components/page/results.rs @@ -2,7 +2,5 @@ use yew::prelude::*; #[function_component(ResultsSection)] pub fn results_section() -> Html { - html! { - - } -} \ No newline at end of file + html! {} +} diff --git a/src/components/page/search.rs b/src/components/page/search.rs index d272941..c1aa8bc 100644 --- a/src/components/page/search.rs +++ b/src/components/page/search.rs @@ -2,7 +2,5 @@ use yew::prelude::*; #[function_component(SearchSection)] pub fn search_section() -> Html { - html! { - - } -} \ No newline at end of file + html! {} +} diff --git a/src/main.rs b/src/main.rs index 72f1fdd..f579b12 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,9 @@ mod api; mod components; -mod utils; mod pages; +mod utils; -use pages::{main_page::MainPage, not_found::NotFound, admin_panel::AdminPanel}; +use pages::{admin_panel::AdminPanel, main_page::MainPage, not_found::NotFound}; use yew::prelude::*; use yew_router::prelude::*; @@ -28,13 +28,12 @@ pub enum Route { #[at("/admin")] AdminPanel, - + #[not_found] #[at("/404")] NotFound, } - pub fn switch(routes: Route) -> Html { match routes { Route::LandingPage => html! { }, diff --git a/src/pages/admin_panel.rs b/src/pages/admin_panel.rs index 44ebb3d..5bac7cc 100644 --- a/src/pages/admin_panel.rs +++ b/src/pages/admin_panel.rs @@ -2,7 +2,5 @@ use yew::prelude::*; #[function_component(AdminPanel)] pub fn admin_panel() -> Html { - html! { - - } -} \ No newline at end of file + html! {} +} diff --git a/src/pages/main_page.rs b/src/pages/main_page.rs index 6b79abc..e77d021 100644 --- a/src/pages/main_page.rs +++ b/src/pages/main_page.rs @@ -1,6 +1,12 @@ use yew::prelude::*; -use crate::components::{page::{hero::HeroSection, agency::AgencySection, search::SearchSection, results::ResultsSection, contact::ContactSection}, footer::Footer}; +use crate::components::{ + footer::Footer, + page::{ + agency::AgencySection, contact::ContactSection, hero::HeroSection, results::ResultsSection, + search::SearchSection, + }, +}; #[function_component(MainPage)] pub fn main_page() -> Html { @@ -14,4 +20,4 @@ pub fn main_page() -> Html {