From 203320c9593cf74a85b23af68ced4f917099b251 Mon Sep 17 00:00:00 2001 From: Eddie Jaoude Date: Wed, 29 Nov 2023 07:40:00 +0000 Subject: [PATCH] fix: simplified external embed links --- components/embeds/external/Profile.js | 45 ++++++++++++++++------- components/user/UserProfile.js | 53 +++++++++++---------------- 2 files changed, 54 insertions(+), 44 deletions(-) diff --git a/components/embeds/external/Profile.js b/components/embeds/external/Profile.js index f08dd4796ad..2d7e5683dee 100644 --- a/components/embeds/external/Profile.js +++ b/components/embeds/external/Profile.js @@ -3,21 +3,27 @@ export default function Profile({ data }) { return (
{ - +
-
{ data.name.slice(0, 49) }{ data.name.length > 49 && "..." }
+
+ {data.name.slice(0, 49)} + {data.name.length > 49 && "..."} +
-
{ data.bio.slice(0, 59) }{ data.bio.length > 59 && "..." }
+
+ {data.bio.slice(0, 59)} + {data.bio.length > 59 && "..."} +
- +
@@ -36,12 +42,25 @@ export default function Profile({ data }) {
- - - - + + + +
- ) + ); } diff --git a/components/user/UserProfile.js b/components/user/UserProfile.js index 79ccd0ee98e..aa6e5339f61 100644 --- a/components/user/UserProfile.js +++ b/components/user/UserProfile.js @@ -17,7 +17,6 @@ import Markdown from "@components/Markdown"; function UserProfile({ BASE_URL, data }) { const [qrShow, setQrShow] = useState(false); - const [embedFormat, setEmbedFormat] = useState("md"); const [premiumShow, setPremiumShow] = useState(false); const router = useRouter(); const fallbackImageSize = 120; @@ -150,36 +149,28 @@ function UserProfile({ BASE_URL, data }) { ))}
-
- -

- {`${BASE_URL}/${data.username}`} -

-
-
-
-
Embed Profile
-
- -
- -
-

- {embedFormat === "md" - ? `[![${data.username} | BioDrop](${BASE_URL}/${data.username}?embed)](${BASE_URL}/${data.username})` - : `${data.username} | BioDrop` - } -

-
-
-
-
+
+
+ +

+ {`${BASE_URL}/${data.username}`} +

+
+
+
+ +

+ {`[![${data.username} | BioDrop](${BASE_URL}/${data.username}?embed)](${BASE_URL}/${data.username})`} +

+
+
+
+ +

+ {`${data.username} | BioDrop`} +

+
+
)}