diff --git a/index.html b/index.html index dd7bccd..40ac2eb 100644 --- a/index.html +++ b/index.html @@ -25,12 +25,14 @@ - - - - - - + + + + + + + + diff --git a/public/favicon-16x16.png b/public/assets/favicon-16x16.png similarity index 100% rename from public/favicon-16x16.png rename to public/assets/favicon-16x16.png diff --git a/public/favicon-32x32.png b/public/assets/favicon-32x32.png similarity index 100% rename from public/favicon-32x32.png rename to public/assets/favicon-32x32.png diff --git a/src/Components/Header/Header.jsx b/src/Components/Header/Header.jsx index 18edff9..5d60e49 100644 --- a/src/Components/Header/Header.jsx +++ b/src/Components/Header/Header.jsx @@ -1,20 +1,25 @@ import { Col, Row } from "react-bootstrap"; import Translate from "../Translate/Translate"; +import PropTypes from "prop-types"; -function Header() { +function Header({ title, lead, disableTranslate }) { return (
-

Know Your Rights

- - {/*

- If you are reading this, you have constitutional rights. -

*/} +

{title || "Know Your Rights"}

+ {!disableTranslate && } + {lead &&

{lead}

}
); } +Header.propTypes = { + title: PropTypes.string, + lead: PropTypes.string, + disableTranslate: PropTypes.bool, +}; + export default Header; diff --git a/src/Components/Resources/ResourceBtn.jsx b/src/Components/Resources/ResourceBtn.jsx index dc44bc7..dbd15e2 100644 --- a/src/Components/Resources/ResourceBtn.jsx +++ b/src/Components/Resources/ResourceBtn.jsx @@ -1,3 +1,4 @@ +import PropTypes from "prop-types"; import { Button } from "react-bootstrap"; function ResourceBtn({ source, data, setModalContent, setShowModal }) { @@ -25,4 +26,11 @@ function ResourceBtn({ source, data, setModalContent, setShowModal }) { ); } +ResourceBtn.prototype = { + source: PropTypes.string, + data: PropTypes.object, + setModalContent: PropTypes.func, + setShowModal: PropTypes.func, +}; + export default ResourceBtn; diff --git a/src/Components/Resources/Resources.jsx b/src/Components/Resources/Resources.jsx index 718c6a0..84153f8 100644 --- a/src/Components/Resources/Resources.jsx +++ b/src/Components/Resources/Resources.jsx @@ -6,15 +6,16 @@ import { digitalResources, printableResources, } from "./content"; +import PropTypes from "prop-types"; - -function Resources() { +function Resources({ hideDigitals, hidePrintables }) { const [showModal, setShowModal] = useState(false); const [modalContent, setModalContent] = useState(null); return (
+ {!hideDigitals && (

Digital Resources

@@ -38,6 +39,8 @@ function Resources() {
+ )} + {!hidePrintables && (

Printable Resources

@@ -56,6 +59,7 @@ function Resources() {
+ )} setShowModal(false)}> {modalContent?.title} @@ -93,4 +97,9 @@ function Resources() { ); } +Resources.prototype = { + hideDigitals: PropTypes.bool, + hidePrintables: PropTypes.bool, +}; + export default Resources; diff --git a/src/Components/Rights/Rights.jsx b/src/Components/Rights/Rights.jsx index cbadb3c..306b3f6 100644 --- a/src/Components/Rights/Rights.jsx +++ b/src/Components/Rights/Rights.jsx @@ -1,63 +1,20 @@ import { Button, Col, Nav, Row, Tab } from "react-bootstrap"; +import { attribution, leftColContent, rightColContent } from "./content"; +import PropTypes from "prop-types"; - -const rightColContent = ( - <> -

- I do not wish to speak with you, answer your questions, or sign or hand - you any documents based on my 5th Amendment rights under the United States - Constitution. -

-

- I do not give you permission to enter my home based on my 4th Amendment - rights under the United States Constitution unless you have a warrant to - enter, signed by a judge or magistrate with my name on it that you slide - under the door. -

-

- I do not give you permission to search any of my belongings based on my - 4th Amendment rights. -

-

I choose to exercise my constitutional rights.

- -); - -const leftColContent = ( - <> -

You have constitutional rights

-

- DO NOT OPEN THE DOOR if an immigration agent is knocking on the - door. -

-

- DO NOT ANSWER ANY QUESTIONS from an immigration agent if they try - to talk to you. You have the right to remain silent. -

-

- DO NOT SIGN ANYTHING without first speaking to a lawyer. You have - the right to speak with a lawyer. -

-

- If you are outside of your home, ask the agent if you are free to leave - and if they say yes, leave calmly. -

-

- GIVE THIS CARD TO THE AGENT. If you are inside of your home, show - the card through the window or slide it under the door. -

- -); - -function Rights() { +function Rights({ ctaUrl, ctaTitle, leftHeader, rightHeader }) { return (
- {leftColContent} + +

{leftHeader || "You have constitutional rights"}

+ {leftColContent} + -

To the agent

+

{rightHeader || "To the agent"}