Skip to content

Commit 1c2edbe

Browse files
authored
Ballot Initiative Banner (codeforboston#2076)
* add ballot_init banner, hide sponsors * updated text
1 parent 21ba422 commit 1c2edbe

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

components/bill/BillDetails.tsx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,22 @@ export const BillDetails = ({ bill }: BillProps) => {
2222

2323
const isPendingUpgrade = useAuth().claims?.role === "pendingUpgrade"
2424
const flags = useFlags()
25-
2625
const { user } = useAuth()
2726

27+
let isBallotMeasure = false
28+
const curComm = bill?.currentCommittee?.id
29+
30+
if (curComm == "SJ42") {
31+
isBallotMeasure = true
32+
}
33+
2834
return (
2935
<>
3036
{isPendingUpgrade && <PendingUpgradeBanner />}
3137
{!isCurrentCourt(bill.court) && (
3238
<Banner>{t("bill.old_session", { billCourt: bill.court })}</Banner>
3339
)}
40+
{isBallotMeasure && <Banner>{t("bill.ballot_initiative")}</Banner>}
3441

3542
<Container className="mt-3 mb-3">
3643
<Row>
@@ -74,14 +81,19 @@ export const BillDetails = ({ bill }: BillProps) => {
7481
</Col>
7582
</Row>
7683
)}
77-
<Row className="mt-2">
84+
<Row className="my-2">
7885
<Col>
7986
<Summary bill={bill} />
8087
</Col>
8188
</Row>
82-
<Row>
89+
<Row className="mt-4">
8390
<Col md={8}>
84-
<Sponsors bill={bill} className="mt-4 pb-1" />
91+
{isBallotMeasure ? (
92+
<></>
93+
) : (
94+
<Sponsors bill={bill} className="pb-1" />
95+
)}
96+
8597
<BillTestimonies bill={bill} className="mt-4" />
8698
{flags.lobbyingTable && (
8799
<LobbyingTable bill={bill} className="mt-4 pb-1" />

public/locales/en/common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"bill": {
1212
"and_others_one": "and {{count}} other",
1313
"and_others_other": "and {{count}} others",
14+
"ballot_initiative": "This bill corresponds to a ballot initiative. The bill is currently before the Legislature, which may choose to enact it directly instead of sending it to voters.",
1415
"bill_tracker": "Bill Tracker",
1516
"bill_cosponsors": "{{billId}} Cosponsors",
1617
"branch": "Branch",

0 commit comments

Comments
 (0)