Skip to content

Commit

Permalink
Refactor profile description truncation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikugodwill committed Feb 5, 2024
1 parent c31900d commit 6a14fb8
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme0.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ return (
<span className="username">@{accountId ?? "creativedao.near"}</span>
<p className="description">
{/* 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")
Expand Down
2 changes: 1 addition & 1 deletion apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme1.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ return (
<h1 className="title">About The Artist</h1>
<p className="description">
{/* 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")
Expand Down
3 changes: 2 additions & 1 deletion apps/BosGenaDrop/widget/DropFlow/ArtistPage/theme2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ return (
<span className="username">@{accountId ?? "creativedao.near"}</span>
<p className="description">
{/* 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")
Expand Down
2 changes: 1 addition & 1 deletion build/BosGenaDrop/src/DropFlow/ArtistPage/theme0.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ return (
<span className="username">@{accountId ?? "creativedao.near"}</span>
<p className="description">
{/* 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")
Expand Down
2 changes: 1 addition & 1 deletion build/BosGenaDrop/src/DropFlow/ArtistPage/theme1.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ return (
<h1 className="title">About The Artist</h1>
<p className="description">
{/* 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")
Expand Down
3 changes: 2 additions & 1 deletion build/BosGenaDrop/src/DropFlow/ArtistPage/theme2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ return (
<span className="username">@{accountId ?? "creativedao.near"}</span>
<p className="description">
{/* 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")
Expand Down

0 comments on commit 6a14fb8

Please sign in to comment.