@@ -59,11 +59,6 @@ const RfiError = ({ isError, metaError }) => (
// duplicate the setting in our props got displaying the required icon until
// Formik has a better way to do it.
-RfiLabel.defaultProps = {
- id: undefined,
- requiredIcon: undefined,
-};
-
RfiLabel.propTypes = {
label: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
@@ -71,21 +66,11 @@ RfiLabel.propTypes = {
requiredIcon: PropTypes.bool,
};
-RfiLegend.defaultProps = {
- label: undefined,
- requiredIcon: undefined,
-};
-
RfiLegend.propTypes = {
label: PropTypes.string.isRequired,
requiredIcon: PropTypes.bool,
};
-RfiError.defaultProps = {
- isError: undefined,
- metaError: undefined,
-};
-
RfiError.propTypes = {
isError: PropTypes.bool,
metaError: PropTypes.string,
diff --git a/packages/component-footer/src/components/Contact/index.js b/packages/component-footer/src/components/Contact/index.js
index dc68249251..ac2c339728 100644
--- a/packages/component-footer/src/components/Contact/index.js
+++ b/packages/component-footer/src/components/Contact/index.js
@@ -11,7 +11,7 @@ import { ColumnSection } from "../ColumnSection";
*/
const Contact = ({
- contact: { title, contactLink, contributionLink, columns },
+ contact: { title = "", contactLink = "", contributionLink = "", columns = []},
}) => {
return (
@@ -72,12 +72,4 @@ Contact.propTypes = {
}),
};
-Contact.defaultProps = {
- contact: {
- title: "",
- contactLink: "",
- contributionLink: "",
- },
-};
-
export { Contact };
diff --git a/packages/component-footer/src/components/Social/index.js b/packages/component-footer/src/components/Social/index.js
index ce35deb7ac..68a6a808ff 100644
--- a/packages/component-footer/src/components/Social/index.js
+++ b/packages/component-footer/src/components/Social/index.js
@@ -19,6 +19,14 @@ const DEFAULT_GA_EVENT = {
section: "primary footer",
};
+const DEF_MEDIA_LINKS = {
+ facebook: "",
+ twitter: "",
+ linkedIn: "",
+ instagram: "",
+ youtube: "",
+};
+
/**
* @typedef {import("../../core/models/types").Social} SocialProps
*/
@@ -28,7 +36,11 @@ const DEFAULT_GA_EVENT = {
* @returns {JSX.Element}
*/
-const Social = ({ social: { logoUrl, unitLogo, mediaLinks } }) => {
+const Social = ({ social: {
+ logoUrl,
+ unitLogo = endorsedLogo,
+ mediaLinks = DEF_MEDIA_LINKS,
+}, }) => {
return (