From 6a14fb88e2bea2b91fb8330c7249eb2c4ea8e7e7 Mon Sep 17 00:00:00 2001 From: Jiku Godwill Nsanwi <65053264+Jikugodwill@users.noreply.github.com> Date: Mon, 5 Feb 2024 10:33:06 +0100 Subject: [PATCH] Refactor profile description truncation logic --- apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme0.jsx | 2 +- apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme1.jsx | 2 +- apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme2.jsx | 3 ++- build/BosGenaDrop/src/DropFlow/ArtistPage/theme0.jsx | 2 +- build/BosGenaDrop/src/DropFlow/ArtistPage/theme1.jsx | 2 +- build/BosGenaDrop/src/DropFlow/ArtistPage/theme2.jsx | 3 ++- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme0.jsx b/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme0.jsx index 5787df8e..0b265339 100644 --- a/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme0.jsx +++ b/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme0.jsx @@ -346,7 +346,7 @@ return ( @{accountId ?? "creativedao.near"}
{/* Truncate the description if it's longer than 6 lines */} - {profile && profile.description.split("\n").length > 6 ? ( + {profile.description && profile.description.split("\n").length > 6 ? ( <> {profile.description .split("\n") diff --git a/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme1.jsx b/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme1.jsx index a01738ff..7571f66d 100644 --- a/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme1.jsx +++ b/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme1.jsx @@ -443,7 +443,7 @@ return (
{/* Truncate the description if it's longer than 6 lines */} - {profile && profile.description.split("\n").length > 6 ? ( + {profile.description && profile.description.split("\n").length > 6 ? ( <> {profile.description .split("\n") diff --git a/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme2.jsx b/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme2.jsx index 9f558bea..ad2b7b7d 100644 --- a/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme2.jsx +++ b/apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme2.jsx @@ -382,7 +382,8 @@ return ( @{accountId ?? "creativedao.near"}
{/* Truncate the description if it's longer than 6 lines */} - {profile && profile.description.split("\n").length > 6 ? ( + {profile.description && + profile.description.split("\n").length > 6 ? ( <> {profile.description .split("\n") diff --git a/build/BosGenaDrop/src/DropFlow/ArtistPage/theme0.jsx b/build/BosGenaDrop/src/DropFlow/ArtistPage/theme0.jsx index 1439e489..deac526e 100644 --- a/build/BosGenaDrop/src/DropFlow/ArtistPage/theme0.jsx +++ b/build/BosGenaDrop/src/DropFlow/ArtistPage/theme0.jsx @@ -346,7 +346,7 @@ return ( @{accountId ?? "creativedao.near"}
{/* Truncate the description if it's longer than 6 lines */} - {profile && profile.description.split("\n").length > 6 ? ( + {profile.description && profile.description.split("\n").length > 6 ? ( <> {profile.description .split("\n") diff --git a/build/BosGenaDrop/src/DropFlow/ArtistPage/theme1.jsx b/build/BosGenaDrop/src/DropFlow/ArtistPage/theme1.jsx index 7c2e3106..f6d6b98b 100644 --- a/build/BosGenaDrop/src/DropFlow/ArtistPage/theme1.jsx +++ b/build/BosGenaDrop/src/DropFlow/ArtistPage/theme1.jsx @@ -443,7 +443,7 @@ return (
{/* Truncate the description if it's longer than 6 lines */} - {profile && profile.description.split("\n").length > 6 ? ( + {profile.description && profile.description.split("\n").length > 6 ? ( <> {profile.description .split("\n") diff --git a/build/BosGenaDrop/src/DropFlow/ArtistPage/theme2.jsx b/build/BosGenaDrop/src/DropFlow/ArtistPage/theme2.jsx index bb7f45dd..dfb5e48f 100644 --- a/build/BosGenaDrop/src/DropFlow/ArtistPage/theme2.jsx +++ b/build/BosGenaDrop/src/DropFlow/ArtistPage/theme2.jsx @@ -382,7 +382,8 @@ return ( @{accountId ?? "creativedao.near"}
{/* Truncate the description if it's longer than 6 lines */} - {profile && profile.description.split("\n").length > 6 ? ( + {profile.description && + profile.description.split("\n").length > 6 ? ( <> {profile.description .split("\n")