diff --git a/components/ProfilePage/StyledProfileComponents.tsx b/components/ProfilePage/StyledProfileComponents.tsx index e784c7bb3..1758c1b88 100644 --- a/components/ProfilePage/StyledProfileComponents.tsx +++ b/components/ProfilePage/StyledProfileComponents.tsx @@ -92,12 +92,14 @@ export const StyledContainer = styled(Container)` width: 100%; } - .view-edit-profile { + .view-edit-profile, + .follow-button { width: 100%; text-decoration: none; } - .view-edit-profile > button { + .view-edit-profile > button, + .follow-button > button { width: 100%; } @@ -123,5 +125,9 @@ export const StyledContainer = styled(Container)` .view-edit-profile > button { width: auto; } + + .follow-button > button { + width: unset; + } } ` diff --git a/components/search/testimony/TestimonyHit.tsx b/components/search/testimony/TestimonyHit.tsx index 6508589ba..cd3af5ee7 100644 --- a/components/search/testimony/TestimonyHit.tsx +++ b/components/search/testimony/TestimonyHit.tsx @@ -5,6 +5,8 @@ import { Testimony } from "components/db/testimony" import { trimContent } from "components/TestimonyCallout/TestimonyCallout" import { formatBillId } from "components/formatting" import { useBill } from "components/db/bills" +import { FollowButton } from "components/shared/FollowButton" +import { Image } from "react-bootstrap" export const TestimonyHit = ({ hit }: { hit: Hit }) => { const url = maple.testimony({ publishedId: hit.id }) @@ -28,6 +30,12 @@ const TestimonyResult = ({ hit }: { hit: Hit }) => { }) const { loading, error, result: bill } = useBill(hit.court, hit.billId) const committee = bill?.currentCommittee + const isOrg = hit.authorRole === "organization" + const writtenBy = isOrg ? ( + {hit.authorDisplayName} + ) : ( + hit.authorDisplayName + ) return (
}) => { marginBottom: "0.75rem" }} > - - Written by {hit.authorDisplayName} - -- {hit.authorRole} - +
+ profile icon + + Written by {writtenBy} + + {isOrg && } +

diff --git a/components/shared/FollowButton.tsx b/components/shared/FollowButton.tsx index aa5847be5..c9058aa33 100644 --- a/components/shared/FollowButton.tsx +++ b/components/shared/FollowButton.tsx @@ -82,16 +82,16 @@ function FollowOrg({ text: string }) { return ( - +
-
+
- +
) }