From 3c19755228c125f549186b2459af3949460818d6 Mon Sep 17 00:00:00 2001 From: andrew Date: Wed, 14 Feb 2024 14:17:08 -0500 Subject: [PATCH] Add post_add --- .../devblog/client/src/components/comment.rs | 5 +- .../devblog/client/src/components/navbar.rs | 1 - devblog/devblog/client/src/pages/post_add.rs | 141 +++++++++++++++++- devblog/devblog/client/src/pages/posts.rs | 9 ++ 4 files changed, 144 insertions(+), 12 deletions(-) diff --git a/devblog/devblog/client/src/components/comment.rs b/devblog/devblog/client/src/components/comment.rs index c91d543..ea4beeb 100644 --- a/devblog/devblog/client/src/components/comment.rs +++ b/devblog/devblog/client/src/components/comment.rs @@ -8,8 +8,7 @@ use crate::{ use chrono::{Local, TimeZone}; use gloo::console::log; use stylist::Style; -use web_sys::MouseEvent; -use yew::{function_component, html, use_effect_with, use_state, Callback, Html, Properties}; +use yew::{function_component, html, use_state, Callback, Html, Properties}; use yewdux::use_store_value; const STYLE: &str = include_str!("styles/comment.css"); @@ -39,7 +38,6 @@ pub fn comment(props: &Props) -> Html { let on_edit_save = move |value: String| { log!("SAVE EDIT COMMENT"); content_clone.set(value); - // props.comment.content = "HOOOOYAHHHH".to_string(); }; html! { @@ -78,7 +76,6 @@ pub fn comment(props: &Props) -> Html { } // CONTENT - //

{&props.comment.content}

{content.deref()}

diff --git a/devblog/devblog/client/src/components/navbar.rs b/devblog/devblog/client/src/components/navbar.rs index 3933176..55d401e 100644 --- a/devblog/devblog/client/src/components/navbar.rs +++ b/devblog/devblog/client/src/components/navbar.rs @@ -23,7 +23,6 @@ pub fn navbar() -> Html {