0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Fixed title conditional to allow for no title

refs https://github.com/TryGhost/Team/issues/1695

We should allow for an empty string to be passed in as the title,
which means a boolean coercion check is not appropriate, we should
check for null which in this case means to use the default title
This commit is contained in:
Fabien "egg" O'Carroll 2022-07-28 15:34:00 +01:00
parent beb8807966
commit 5ed16075b7

View file

@ -24,7 +24,7 @@ const CommentsBoxContent = (props) => {
{/* {TODO: Put in conditionals and variables for the new comment helper} */}
<div className="w-full flex justify-between items-baseline font-sans mb-10">
<h2 className="font-bold text-[2.8rem] tracking-tight dark:text-[rgba(255,255,255,0.85)]">
{title ? title : <><span className="hidden sm:inline">Member </span><span className="capitalize sm:normal-case">discussion</span></>}
{title !== null ? title : <><span className="hidden sm:inline">Member </span><span className="capitalize sm:normal-case">discussion</span></>}
</h2>
{count ? <div className="text-neutral-400 text-[1.6rem]">{commentsCount} comments</div> : null}
</div>