From fc6c5c68fdb39e52fa445078112bdfdf46d144c1 Mon Sep 17 00:00:00 2001
From: mybearworld <130385691+mybearworld@users.noreply.github.com>
Date: Fri, 26 Jul 2024 18:45:18 +0200
Subject: [PATCH] Post links
---
src/App.tsx | 4 +++
src/components/MarkdownInput.tsx | 2 +-
src/components/Popup.tsx | 6 ++--
src/components/Post.tsx | 58 ++++++++++++++++++++++----------
src/components/PostPopup.tsx | 21 ++++++++++++
5 files changed, 70 insertions(+), 21 deletions(-)
create mode 100644 src/components/PostPopup.tsx
diff --git a/src/App.tsx b/src/App.tsx
index 1d15887..e58547f 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -10,6 +10,7 @@ import { Chat } from "./components/Chat";
import { Chats } from "./components/Chats";
import { Button } from "./components/Button";
import { Ulist } from "./components/Ulist";
+import { PostPopup } from "./components/PostPopup";
import { Popup } from "./components/Popup";
import { User } from "./components/User";
import { IconButton } from "./components/IconButton";
@@ -19,6 +20,7 @@ export const App = () => {
useShallow((state) => [state.openChat, state.setOpenChat]),
);
const user = new URLSearchParams(location.search).get("user");
+ const post = new URLSearchParams(location.search).get("post");
return (
@@ -70,6 +72,8 @@ export const App = () => {
{user ?
+ : post ?
+
: undefined}
);
diff --git a/src/components/MarkdownInput.tsx b/src/components/MarkdownInput.tsx
index 6e2fb1d..9729199 100644
--- a/src/components/MarkdownInput.tsx
+++ b/src/components/MarkdownInput.tsx
@@ -195,7 +195,7 @@ export const MarkdownInput = (props: MarkdownInputProps) => {
{replies.map((reply, index) => (