Skip to content

Commit

Permalink
feat: fixed hyperlink and summary
Browse files Browse the repository at this point in the history
  • Loading branch information
aaerhart committed Jan 19, 2025
1 parent 80ec4ae commit e807a3e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 24 deletions.
61 changes: 38 additions & 23 deletions components/bill/SmartDisclaimer.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useTranslation } from "next-i18next"
import { Trans, useTranslation } from "next-i18next"
import Image from "react-bootstrap/Image"
import styled from "styled-components"
import { useMediaQuery } from "usehooks-ts"
import { Col, Row } from "../bootstrap"
import { NavLink } from "components/Navlink"
import * as links from "../links"

const SmartTagDesc = styled(Row)`
font-size: 12px;
Expand All @@ -17,42 +18,56 @@ export const SmartDisclaimer = () => {
<>
{isMobile ? (
<div className={`m-3`}>
<Row className={`fs-5 fw-bold`}>{t("bill.smart_summary")}</Row>
<Row className={`fs-5 fw-bold`} fontSize={"12px"}>
{t("bill.smart_summary")}
</Row>
<SmartTagDesc>
{
"This content has been generated using artificial intelligence and may not accurately reflect the details of the legislation."
}
<NavLink
className={"navLink-primary"}
href="/about/how-maple-uses-ai"
>{`Learn more about How MAPLE Uses AI. `}</NavLink>
{
"To report an inaccuracy or to suggest an improvement, please email [email protected]"
}
<Trans
t={t}
i18nKey="bill.smart_disclaimer"
components={[
// eslint-disable-next-line react/jsx-key
<links.Internal href="/about/how-maple-uses-ai" />
]}
/>
</SmartTagDesc>
</div>
) : (
<Row className={`d-flex my-3`} xs="auto">
<Row className={`d-flex my-3`} fontSize={"12px"} xs="auto">
<Col>
<Image src="/images/smart-summary.svg" alt={t("bill.smart_tag")} />
</Col>
<Col className={`mt-1`} xs="10">
<Row className={`fs-5 fw-bold`}>{t("bill.smart_summary")}</Row>
<SmartTagDesc>
{
"This content has been generated using artificial intelligence and may not accurately reflect the details of the legislation."
}
<NavLink
className={"navLink-primary"}
href="/about/how-maple-uses-ai"
>{`Learn more about How MAPLE Uses AI. `}</NavLink>
{
"To report an inaccuracy or to suggest an improvement, please email [email protected]"
}
<Trans
t={t}
i18nKey="bill.smart_disclaimer"
components={[
// eslint-disable-next-line react/jsx-key
<links.Internal href="/about/how-maple-uses-ai" />
]}
/>
</SmartTagDesc>
</Col>
</Row>
)}
</>
)
}

/*
{
"This content has been generated using artificial intelligence and may not accurately reflect the details of the legislation."
}
<NavLink
className={"navLink-primary"}
href="/about/how-maple-uses-ai"
>{`Learn more about How MAPLE Uses AI. `}</NavLink>
{
"To report an inaccuracy or to suggest an improvement, please email admin@mapletestimony.org"
}
*/
2 changes: 1 addition & 1 deletion public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"smart_tag": "AI Smart Tag",
"smart_summary": "Smart Summary & Tags",
"smart_disclaimer": "This content has been generated using artificial intelligence and may not accurately reflect the details of the legislation. Learn more about {{howToLink}}. To report an inaccuracy or to suggest an improvement, please email [email protected]"
"smart_disclaimer": "This content has been generated using artificial intelligence and may not accurately reflect the details of the legislation. Learn more about <0>how MAPLE uses AI</0>. To report an inaccuracy or to suggest an improvement, please email [email protected]"
},
"bill_updates": "Bill Updates",
"browse_bills": "browse bills",
Expand Down

0 comments on commit e807a3e

Please sign in to comment.