Skip to content

Commit c2e6047

Browse files
authored
Merge pull request #1859 from mertbagt/newsfeed-subheading
fix Newsfeed subheading
2 parents ee75b44 + 144551e commit c2e6047

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

components/Card/CardTitle.tsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ interface CardTitleProps {
1717
isUserMatch?: boolean
1818
type?: string
1919
userRole?: string
20+
isNewsfeed?: string
2021
}
2122

2223
export const CardTitle = (props: CardTitleProps) => {
@@ -29,7 +30,8 @@ export const CardTitle = (props: CardTitleProps) => {
2930
isUserMatch,
3031
subheader,
3132
type,
32-
userRole
33+
userRole,
34+
isNewsfeed
3335
} = props
3436

3537
return (
@@ -44,14 +46,18 @@ export const CardTitle = (props: CardTitleProps) => {
4446
subheader={subheader}
4547
type={type}
4648
/>
47-
<CardTitleFollowing
48-
billId={billId}
49-
header={header}
50-
subheader={subheader}
51-
isBillMatch={isBillMatch}
52-
isUserMatch={isUserMatch}
53-
type={type}
54-
/>
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+
)}
5561
</CardBootstrap.Body>
5662
</CardBootstrap.Body>
5763
)

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)