Skip to content

Commit 144551e

Browse files
committed
subheading only shows up for newsfeed as intended
1 parent 4b6626c commit 144551e

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

components/Card/CardTitle.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export const CardTitle = (props: CardTitleProps) => {
3030
isUserMatch,
3131
subheader,
3232
type,
33-
userRole
33+
userRole,
34+
isNewsfeed
3435
} = props
3536

3637
return (
@@ -45,14 +46,18 @@ export const CardTitle = (props: CardTitleProps) => {
4546
subheader={subheader}
4647
type={type}
4748
/>
48-
<CardTitleFollowing
49-
billId={billId}
50-
header={header}
51-
subheader={subheader}
52-
isBillMatch={isBillMatch}
53-
isUserMatch={isUserMatch}
54-
type={type}
55-
/>
49+
{isNewsfeed ? (
50+
<CardTitleFollowing
51+
billId={billId}
52+
header={header}
53+
subheader={subheader}
54+
isBillMatch={isBillMatch}
55+
isUserMatch={isUserMatch}
56+
type={type}
57+
/>
58+
) : (
59+
<></>
60+
)}
5661
</CardBootstrap.Body>
5762
</CardBootstrap.Body>
5863
)

components/Newsfeed/Newsfeed.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ export default function Newsfeed() {
230230
testimonyId={element.testimonyId}
231231
type={element.type}
232232
userRole={element.userRole}
233+
isNewsfeed={"enable newsfeed specific subheading"}
233234
/>
234235
</div>
235236
))}

components/NewsfeedCard/NewsfeedCard.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const NewsfeedCard = (props: {
2525
timestamp: Timestamp
2626
type: string
2727
userRole?: string
28+
isNewsfeed?: string
2829
}) => {
2930
const date = props.timestamp.toDate()
3031
const formattedTimestamp = `${date.toLocaleDateString()}`
@@ -40,6 +41,7 @@ export const NewsfeedCard = (props: {
4041
timestamp={formattedTimestamp}
4142
type={props.type}
4243
userRole={props.userRole}
44+
isNewsfeed={"enable newsfeed specific subheading"}
4345
/>
4446
)
4547

0 commit comments

Comments
 (0)