diff options
Diffstat (limited to 'gui/src/components/post/Header.tsx')
| -rw-r--r-- | gui/src/components/post/Header.tsx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gui/src/components/post/Header.tsx b/gui/src/components/post/Header.tsx index 0dfd5e4..b0822b4 100644 --- a/gui/src/components/post/Header.tsx +++ b/gui/src/components/post/Header.tsx @@ -1,11 +1,9 @@ import { date_diff } from "@/logic/utils"; import type { PostProps } from "./Post"; import { useLocation } from "wouter"; -import useLocalState from "@/state/state"; function Header(props: PostProps) { const [_, navigate] = useLocation(); - const profiles = useLocalState((s) => s.profiles); - const profile = profiles.get(props.poast.author); + const { profile } = props; // console.log("profile", profile); // console.log(props.poast.author.length, "length"); function go(e: React.MouseEvent) { @@ -21,13 +19,11 @@ function Header(props: PostProps) { const name = profile ? ( profile.name ) : ( - <div className="name cp"> - <p className="p-only">{poast.author}</p> - </div> + <p className="p-only">{poast.author}</p> ); return ( <header> - <div className="author flex-align" role="link" onMouseUp={go}> + <div className="cp author flex-align name" role="link" onMouseUp={go}> {name} </div> <div role="link" onMouseUp={openThread} className="date"> |
