diff --git a/client/src/Post.scss b/client/src/Post.scss index 7646b78..e944445 100644 --- a/client/src/Post.scss +++ b/client/src/Post.scss @@ -11,9 +11,31 @@ word-wrap: anywhere; } - .createdDate { + .footer { margin-top: 0.3rem; font-size: 0.7rem; color: #A0A0A0; + + display: flex; + flex: auto; + width: 100%; + + .info { + flex-grow: 1; + align-self: start; + } + + .actions { + align-self: end; + button { + background: none; + border: none; + padding: 0; + text-decoration: none; + cursor: pointer; + color: inherit; + font-size: inherit; + } + } } } \ No newline at end of file diff --git a/client/src/Post.tsx b/client/src/Post.tsx index fc55ed4..2cf4f99 100644 --- a/client/src/Post.tsx +++ b/client/src/Post.tsx @@ -1,16 +1,43 @@ import "./Post.scss"; +import { Form } from "react-router-dom"; export function Post({ text, createdDate, + actions, + id, }: { text: string; createdDate: string; + actions: boolean; + id: number; }) { return (
{text} - {createdDate} +
+
+ {createdDate} +
+ {actions && ( +
+
+ + +
+
+ )} +
); } diff --git a/client/src/Profile.tsx b/client/src/Profile.tsx index e371aa4..c4536c9 100644 --- a/client/src/Profile.tsx +++ b/client/src/Profile.tsx @@ -9,7 +9,7 @@ export interface IProfileProps { self: boolean; } -export function Profile(props: IProfileProps) { +export function Profile({ self }: IProfileProps) { const loaderData = useLoaderData() as LoaderToType< typeof profileSelfLoader >; @@ -31,7 +31,9 @@ export function Profile(props: IProfileProps) {