diff --git a/src/app.rs b/src/app.rs index 85374d4f..ad4d33d8 100644 --- a/src/app.rs +++ b/src/app.rs @@ -7,7 +7,7 @@ use crate::{ menu::Menu, post_view::{PostView, PostViewCtx}, privacy::PrivacyPolicy, - profile::ProfileView, + profile::{profile_post::ProfilePost, ProfileView}, refer_earn::ReferEarn, root::RootPage, terms::TermsOfService, @@ -114,6 +114,7 @@ pub fn App() -> impl IntoView { + diff --git a/src/component/mod.rs b/src/component/mod.rs index 0457ca8f..b756019f 100644 --- a/src/component/mod.rs +++ b/src/component/mod.rs @@ -21,3 +21,4 @@ pub mod social; pub mod spinner; pub mod title; pub mod toggle; +pub mod video_player; diff --git a/src/component/nav.rs b/src/component/nav.rs index c77645ec..b9ffabbc 100644 --- a/src/component/nav.rs +++ b/src/component/nav.rs @@ -103,7 +103,7 @@ pub fn NavBar() -> impl IntoView { "/upload" => 2, "/wallet" | "/transactions" => 3, "/menu" => 4, - s if s.starts_with("/hot-or-not") => { + s if s.starts_with("/hot-or-not") || s.starts_with("/profile") => { home_path.set(path); 0 } diff --git a/src/component/video_player.rs b/src/component/video_player.rs new file mode 100644 index 00000000..4ce32ecb --- /dev/null +++ b/src/component/video_player.rs @@ -0,0 +1,34 @@ +use leptos::*; +use leptos_dom::{html::Video, NodeRef}; + +#[component] +pub fn VideoPlayer( + #[prop(optional)] node_ref: NodeRef