diff --git a/apps/climatemappedafrica/src/components/DropdownSearch/index.js b/apps/climatemappedafrica/src/components/DropdownSearch/index.js index 20a7adf12..83a644503 100644 --- a/apps/climatemappedafrica/src/components/DropdownSearch/index.js +++ b/apps/climatemappedafrica/src/components/DropdownSearch/index.js @@ -62,11 +62,11 @@ const useStyles = makeStyles(({ palette, typography }) => ({ })); function DropdownSearch({ - href: hrefProp, - label, + href: hrefProp = "/explore", + label = "Search for a location", counties, onClick, - icon: iconProp, + icon: iconProp = SearchIcon, placeholder, variant, ...props @@ -176,14 +176,4 @@ DropdownSearch.propTypes = { placeholder: PropTypes.string, }; -DropdownSearch.defaultProps = { - label: "Search for a location", - href: "/explore", - onClick: undefined, - icon: SearchIcon, - counties: undefined, - variant: undefined, - placeholder: undefined, -}; - export default DropdownSearch; diff --git a/apps/climatemappedafrica/src/components/ExplorePage/index.js b/apps/climatemappedafrica/src/components/ExplorePage/index.js index 73bab2ca7..20c977918 100644 --- a/apps/climatemappedafrica/src/components/ExplorePage/index.js +++ b/apps/climatemappedafrica/src/components/ExplorePage/index.js @@ -21,7 +21,7 @@ function initialState(profiles, onClick) { }; } -function ExplorePage({ panelProps, profile: profileProp, ...props }) { +function ExplorePage({ panelProps, profile: profileProp, apiUri, ...props }) { const theme = useTheme(); const classes = useStyles(props); // NOTE: This setState and the corresponding useEffect are "hacks" since at @@ -186,10 +186,4 @@ ExplorePage.propTypes = { ]), }; -ExplorePage.defaultProps = { - apiUri: undefined, - panelProps: undefined, - profile: undefined, -}; - export default ExplorePage; diff --git a/apps/climatemappedafrica/src/components/HURUmap/CategoryHeader/index.js b/apps/climatemappedafrica/src/components/HURUmap/CategoryHeader/index.js index d06166023..7299564cb 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/CategoryHeader/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/CategoryHeader/index.js @@ -36,10 +36,4 @@ CategoryHeader.propTypes = { icon: PropTypes.string, }; -CategoryHeader.defaultProps = { - title: undefined, - description: undefined, - icon: undefined, -}; - export default CategoryHeader; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Chart/Filters.js b/apps/climatemappedafrica/src/components/HURUmap/Chart/Filters.js index 8edaf6f88..17827fdfa 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Chart/Filters.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Chart/Filters.js @@ -164,12 +164,4 @@ Filters.propTypes = { }), }; -Filters.defaultProps = { - defaultFilters: undefined, - filterGroups: undefined, - filterSelectProps: undefined, - setFilterSelectProps: undefined, - view: undefined, -}; - export default Filters; diff --git a/apps/climatemappedafrica/src/components/HURUmap/ChartFilter/index.js b/apps/climatemappedafrica/src/components/HURUmap/ChartFilter/index.js index d40b71dbb..18bfb64b2 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/ChartFilter/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/ChartFilter/index.js @@ -13,8 +13,8 @@ function ChartFilter({ onSelectAttribute, deleteFilter, index, - attributeText, - valueText, + attributeText = "Filter by attribute:", + valueText = "Select a value:", selectedAttribute: selectedAttributeProp, selectedValue: selectedValueProp, ...props @@ -161,8 +161,6 @@ ChartFilter.defaultProps = { onSelectAttribute: undefined, selectedValue: undefined, selectedAttribute: undefined, - attributeText: "Filter by attribute:", - valueText: "Select a value:", }; export default ChartFilter; diff --git a/apps/climatemappedafrica/src/components/HURUmap/KeyMetric/index.js b/apps/climatemappedafrica/src/components/HURUmap/KeyMetric/index.js index 6e39bbc24..5257ff0e9 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/KeyMetric/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/KeyMetric/index.js @@ -94,17 +94,4 @@ KeyMetric.propTypes = { parentFormattedValue: PropTypes.string, }; -KeyMetric.defaultProps = { - className: undefined, - color: undefined, - description: undefined, - displayFormat: undefined, - formattedValue: undefined, - metadata: undefined, - title: undefined, - value: undefined, - parentName: undefined, - parentFormattedValue: undefined, -}; - export default KeyMetric; diff --git a/apps/climatemappedafrica/src/components/HURUmap/LocationHeader/index.js b/apps/climatemappedafrica/src/components/HURUmap/LocationHeader/index.js index 3b12f7b51..e74abf92f 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/LocationHeader/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/LocationHeader/index.js @@ -79,12 +79,4 @@ LocationHeader.propTypes = { title: PropTypes.string, }; -LocationHeader.defaultProps = { - icon: undefined, - level: undefined, - onClick: undefined, - parent: undefined, - title: undefined, -}; - export default LocationHeader; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/PanelButtons.js b/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/PanelButtons.js index fdcc6af3a..60404788e 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/PanelButtons.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/PanelButtons.js @@ -171,15 +171,4 @@ PanelButtons.propTypes = { }), }; -PanelButtons.defaultProps = { - drawerRef: undefined, - isCompare: undefined, - isPinning: undefined, - onClickPin: undefined, - onClickUnpin: undefined, - panelItems: undefined, - primaryProfile: undefined, - secondaryProfile: undefined, -}; - export default PanelButtons; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/PanelItem.js b/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/PanelItem.js index 191902e83..d17a0ce78 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/PanelItem.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/PanelItem.js @@ -18,8 +18,4 @@ PanelItem.propTypes = { }), }; -PanelItem.defaultProps = { - item: undefined, -}; - export default PanelItem; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/RichData.js b/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/RichData.js index 53ce093a6..df3330c20 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/RichData.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/RichData.js @@ -40,8 +40,4 @@ RichData.propTypes = { }), }; -RichData.defaultProps = { - primaryProfile: undefined, -}; - export default RichData; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/index.js b/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/index.js index 8c12bd327..453856583 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Panel/DesktopPanel/index.js @@ -48,13 +48,4 @@ DesktopPanel.propTypes = { }), }; -DesktopPanel.defaultProps = { - isCompare: undefined, - isPinning: undefined, - onClickPin: undefined, - onClickUnpin: undefined, - panelItems: undefined, - primaryProfile: undefined, -}; - export default DesktopPanel; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/RichData.js b/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/RichData.js index eac0b8c53..54eb279bb 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/RichData.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/RichData.js @@ -5,7 +5,7 @@ import SubcategoryList from "./SubcategoryList"; import Profile from "@/climatemappedafrica/components/HURUmap/Panel/Profile"; -function RichData({ item, ...props }) { +function RichData({ item, geography, ...props }) { return ( <> @@ -26,9 +26,4 @@ RichData.propTypes = { }), }; -RichData.defaultProps = { - item: undefined, - geography: undefined, -}; - export default RichData; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/SubcategoryList.js b/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/SubcategoryList.js index 6fda944fb..2b8099f73 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/SubcategoryList.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/SubcategoryList.js @@ -119,8 +119,4 @@ SubcategoryList.propTypes = { items: PropTypes.arrayOf(PropTypes.shape({})), }; -SubcategoryList.defaultProps = { - items: undefined, -}; - export default SubcategoryList; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/index.js b/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/index.js index b64db7093..a73489c9e 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Panel/MobilePanel/index.js @@ -112,12 +112,4 @@ MobilePanel.propTypes = { scrollToTopLabel: PropTypes.string, }; -MobilePanel.defaultProps = { - activeType: undefined, - dataNotAvailable: undefined, - onSelectLocation: undefined, - primaryProfile: undefined, - scrollToTopLabel: undefined, -}; - export default MobilePanel; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Panel/Profile.js b/apps/climatemappedafrica/src/components/HURUmap/Panel/Profile.js index 93be427aa..876e8542b 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Panel/Profile.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Panel/Profile.js @@ -195,16 +195,4 @@ Profile.propTypes = { }), }; -Profile.defaultProps = { - categories: undefined, - dataNotAvailable: undefined, - isLoading: undefined, - isPinning: undefined, - onClickPin: undefined, - onClickUnpin: undefined, - onSelectLocation: undefined, - primaryProfile: undefined, - secondaryProfile: undefined, -}; - export default Profile; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Panel/ProfileItems.js b/apps/climatemappedafrica/src/components/HURUmap/Panel/ProfileItems.js index 453c4ab82..043bdb54f 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Panel/ProfileItems.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Panel/ProfileItems.js @@ -252,14 +252,4 @@ ProfileItems.propTypes = { }), }; -ProfileItems.defaultProps = { - categories: undefined, - dataNotAvailable: undefined, - getSecondaryIndicator: undefined, - getSecondaryMetric: undefined, - geoCode: undefined, - primaryProfile: undefined, - secondaryProfile: undefined, -}; - export default ProfileItems; diff --git a/apps/climatemappedafrica/src/components/HURUmap/PanelButtonGroup/index.js b/apps/climatemappedafrica/src/components/HURUmap/PanelButtonGroup/index.js index 58432e37f..a13742c4f 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/PanelButtonGroup/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/PanelButtonGroup/index.js @@ -7,7 +7,7 @@ import React from "react"; import useStyles from "./useStyles"; -function PanelButtonGroup({ items, value, onChange, pins, ...props }) { +function PanelButtonGroup({ items, value, onChange, pins = [], ...props }) { const classes = useStyles(props); const handleChange = (_, selected) => { onChange(selected); @@ -63,11 +63,4 @@ PanelButtonGroup.propTypes = { onChange: PropTypes.func, }; -PanelButtonGroup.defaultProps = { - pins: [], - items: undefined, - value: undefined, - onChange: undefined, -}; - export default PanelButtonGroup; diff --git a/apps/climatemappedafrica/src/components/HURUmap/PinAndCompare/index.js b/apps/climatemappedafrica/src/components/HURUmap/PinAndCompare/index.js index 778f2e7b3..4116f94e7 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/PinAndCompare/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/PinAndCompare/index.js @@ -14,12 +14,12 @@ function PinIcon(props) { function PinAndCompare({ helperText, - isMobile, + isMobile = false, currentGeographyCode, locations, onChange, - onClose, onClickPin, + onClose, placeholder, ...props }) { @@ -110,15 +110,4 @@ PinAndCompare.propTypes = { placeholder: PropTypes.string, }; -PinAndCompare.defaultProps = { - helperText: undefined, - isMobile: false, - currentGeographyCode: undefined, - locations: undefined, - onChange: undefined, - onClickPin: undefined, - onClose: undefined, - placeholder: undefined, -}; - export default PinAndCompare; diff --git a/apps/climatemappedafrica/src/components/HURUmap/SubcategoryHeader/index.js b/apps/climatemappedafrica/src/components/HURUmap/SubcategoryHeader/index.js index 51da431ba..b6c19ab3b 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/SubcategoryHeader/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/SubcategoryHeader/index.js @@ -53,9 +53,4 @@ SubcategoryHeader.propTypes = { description: PropTypes.string, }; -SubcategoryHeader.defaultProps = { - title: undefined, - description: undefined, -}; - export default SubcategoryHeader; diff --git a/apps/climatemappedafrica/src/components/HURUmap/TreeView/index.js b/apps/climatemappedafrica/src/components/HURUmap/TreeView/index.js index 668325f64..61a6d2448 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/TreeView/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/TreeView/index.js @@ -89,9 +89,4 @@ TreeView.propTypes = { onLabelClick: PropTypes.func, }; -TreeView.defaultProps = { - items: undefined, - onLabelClick: undefined, -}; - export default TreeView; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Tutorial/TutorialStep/index.js b/apps/climatemappedafrica/src/components/HURUmap/Tutorial/TutorialStep/index.js index aee40a2df..d3a264a65 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Tutorial/TutorialStep/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Tutorial/TutorialStep/index.js @@ -77,12 +77,4 @@ TutorialStep.propTypes = { selector: PropTypes.string, }; -TutorialStep.defaultProps = { - description: undefined, - image: undefined, - onClose: undefined, - title: undefined, - selector: undefined, -}; - export default TutorialStep; diff --git a/apps/climatemappedafrica/src/components/HURUmap/Tutorial/index.js b/apps/climatemappedafrica/src/components/HURUmap/Tutorial/index.js index 49ff4ad78..49f334e16 100644 --- a/apps/climatemappedafrica/src/components/HURUmap/Tutorial/index.js +++ b/apps/climatemappedafrica/src/components/HURUmap/Tutorial/index.js @@ -27,7 +27,7 @@ const useStyles = makeStyles(({ typography, palette }) => ({ }, })); -function Tutorial({ children, defaultOpen, items, ...props }) { +function Tutorial({ children, defaultOpen = false, items, ...props }) { const classes = useStyles(props); const { setIsOpen } = useTour(); setIsOpen(defaultOpen); @@ -80,10 +80,4 @@ Tutorial.propTypes = { defaultOpen: PropTypes.bool, }; -Tutorial.defaultProps = { - items: undefined, - children: undefined, - defaultOpen: false, -}; - export default Tutorial; diff --git a/apps/climatemappedafrica/src/components/Image/index.js b/apps/climatemappedafrica/src/components/Image/index.js index 388b6f627..af4a306df 100644 --- a/apps/climatemappedafrica/src/components/Image/index.js +++ b/apps/climatemappedafrica/src/components/Image/index.js @@ -16,9 +16,4 @@ Image.propTypes = { src: PropTypes.oneOfType([PropTypes.shape({}), PropTypes.string]), }; -Image.defaultProps = { - placeholder: undefined, - src: undefined, -}; - export default Image; diff --git a/apps/climatemappedafrica/src/components/Link/index.js b/apps/climatemappedafrica/src/components/Link/index.js index 2429b27d3..59db32605 100644 --- a/apps/climatemappedafrica/src/components/Link/index.js +++ b/apps/climatemappedafrica/src/components/Link/index.js @@ -52,18 +52,6 @@ NextComposed.propTypes = { shallow: PropTypes.bool, }; -NextComposed.defaultProps = { - as: undefined, - component: undefined, - href: undefined, - locale: undefined, - passHref: undefined, - prefetch: undefined, - replace: undefined, - scroll: undefined, - shallow: undefined, -}; - // A styled version of the Next.js Link component: // https://nextjs.org/docs/api-reference/next/link/ const Link = forwardRef(function Link(props, ref) { @@ -142,14 +130,4 @@ Link.propTypes = { prefetch: PropTypes.bool, }; -Link.defaultProps = { - activeClassName: undefined, - as: undefined, - className: undefined, - href: undefined, - naked: undefined, - onClick: undefined, - prefetch: undefined, -}; - export default Link; diff --git a/apps/climatemappedafrica/src/components/Menu/index.js b/apps/climatemappedafrica/src/components/Menu/index.js index 8fcb59481..003842c48 100644 --- a/apps/climatemappedafrica/src/components/Menu/index.js +++ b/apps/climatemappedafrica/src/components/Menu/index.js @@ -154,8 +154,4 @@ Menu.propTypes = { children: PropTypes.node, }; -Menu.defaultProps = { - children: undefined, - socialLinks: undefined, -}; export default Menu; diff --git a/apps/climatemappedafrica/src/components/Navigation/DesktopNavigation/index.js b/apps/climatemappedafrica/src/components/Navigation/DesktopNavigation/index.js index 719e8490b..b331ac243 100644 --- a/apps/climatemappedafrica/src/components/Navigation/DesktopNavigation/index.js +++ b/apps/climatemappedafrica/src/components/Navigation/DesktopNavigation/index.js @@ -69,11 +69,4 @@ DesktopNavigation.propTypes = { }), }; -DesktopNavigation.defaultProps = { - logoProps: undefined, - menuProps: undefined, - socialLinks: undefined, - desktopLogoProps: undefined, -}; - export default DesktopNavigation; diff --git a/apps/climatemappedafrica/src/components/Navigation/ExploreNavigation/index.js b/apps/climatemappedafrica/src/components/Navigation/ExploreNavigation/index.js index fbaa55a92..82420055c 100644 --- a/apps/climatemappedafrica/src/components/Navigation/ExploreNavigation/index.js +++ b/apps/climatemappedafrica/src/components/Navigation/ExploreNavigation/index.js @@ -146,13 +146,4 @@ ExploreNavigation.propTypes = { }), }; -ExploreNavigation.defaultProps = { - logoProps: undefined, - menuProps: undefined, - onOpenHelp: undefined, - socialLinks: undefined, - desktopLogoProps: undefined, - mobileLogoProps: undefined, -}; - export default ExploreNavigation; diff --git a/apps/climatemappedafrica/src/components/Navigation/index.js b/apps/climatemappedafrica/src/components/Navigation/index.js index 1a720ee8f..866c319f1 100644 --- a/apps/climatemappedafrica/src/components/Navigation/index.js +++ b/apps/climatemappedafrica/src/components/Navigation/index.js @@ -76,8 +76,4 @@ Navigation.propTypes = { variant: PropTypes.string, }; -Navigation.defaultProps = { - variant: undefined, -}; - export default Navigation; diff --git a/apps/climatemappedafrica/src/components/Page/Base.js b/apps/climatemappedafrica/src/components/Page/Base.js index a7e62d457..d7421469d 100644 --- a/apps/climatemappedafrica/src/components/Page/Base.js +++ b/apps/climatemappedafrica/src/components/Page/Base.js @@ -9,7 +9,7 @@ import getNavigationMenu from "@/climatemappedafrica/functions/menus/getNavigati /** * Base page that can be used to build all other pages. */ -function BasePage({ children, menus, variant, post, ...props }) { +function BasePage({ children, menus, variant, ...props }) { const seo = {}; const navigation = getNavigationMenu(menus?.primaryMenu || []); const { menuProps, socialLinks } = navigation; diff --git a/apps/climatemappedafrica/src/components/Page/index.js b/apps/climatemappedafrica/src/components/Page/index.js index c119e9369..4d32d3f87 100644 --- a/apps/climatemappedafrica/src/components/Page/index.js +++ b/apps/climatemappedafrica/src/components/Page/index.js @@ -7,7 +7,7 @@ import Base from "./Base"; * Page component that adds error handling. * TODO(kilemensi): Add error handling once we have error page designs */ -function Page({ errorCode, ...props }) { +function Page(props) { return ; } @@ -15,8 +15,4 @@ Page.propTypes = { errorCode: PropTypes.number, }; -Page.defaultProps = { - errorCode: undefined, -}; - export default Page; diff --git a/apps/climatemappedafrica/src/components/Section/index.js b/apps/climatemappedafrica/src/components/Section/index.js index dadeceead..9b980d468 100644 --- a/apps/climatemappedafrica/src/components/Section/index.js +++ b/apps/climatemappedafrica/src/components/Section/index.js @@ -21,7 +21,7 @@ const useStyles = makeStyles(({ breakpoints, typography, widths }) => ({ }, {}), })); -function Section({ className, fixed, ...props }) { +function Section({ className, fixed = true, ...props }) { const classes = useStyles(props); return ( @@ -44,9 +44,4 @@ Section.propTypes = { fixed: PropTypes.bool, }; -Section.defaultProps = { - className: undefined, - fixed: true, -}; - export default Section; diff --git a/apps/climatemappedafrica/src/components/Select/index.js b/apps/climatemappedafrica/src/components/Select/index.js index ec884a3f4..a90540397 100644 --- a/apps/climatemappedafrica/src/components/Select/index.js +++ b/apps/climatemappedafrica/src/components/Select/index.js @@ -128,15 +128,4 @@ Input.propTypes = { selected: PropTypes.string, }; -Input.defaultProps = { - disabled: undefined, - helperText: undefined, - onChange: undefined, - onOpen: undefined, - onClose: undefined, - open: undefined, - placeholder: undefined, - selected: undefined, -}; - export default Input; diff --git a/apps/climatemappedafrica/src/components/SocialMediaIcons/index.js b/apps/climatemappedafrica/src/components/SocialMediaIcons/index.js index 06769049b..2b02c0b61 100644 --- a/apps/climatemappedafrica/src/components/SocialMediaIcons/index.js +++ b/apps/climatemappedafrica/src/components/SocialMediaIcons/index.js @@ -85,8 +85,4 @@ SocialMediaIcons.propTypes = { ), }; -SocialMediaIcons.defaultProps = { - socialLinks: undefined, -}; - export default SocialMediaIcons; diff --git a/apps/climatemappedafrica/src/components/Tabs/TabPanel.js b/apps/climatemappedafrica/src/components/Tabs/TabPanel.js index 9451c8172..b815e2aab 100644 --- a/apps/climatemappedafrica/src/components/Tabs/TabPanel.js +++ b/apps/climatemappedafrica/src/components/Tabs/TabPanel.js @@ -30,11 +30,4 @@ TabPanel.propTypes = { selected: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), }; -TabPanel.defaultProps = { - children: undefined, - value: undefined, - name: undefined, - selected: undefined, -}; - export default TabPanel; diff --git a/apps/climatemappedafrica/src/components/Tabs/index.js b/apps/climatemappedafrica/src/components/Tabs/index.js index 3ad7f71e6..011bf7b81 100644 --- a/apps/climatemappedafrica/src/components/Tabs/index.js +++ b/apps/climatemappedafrica/src/components/Tabs/index.js @@ -15,7 +15,7 @@ function a11yProps(name, index) { } function Tabs({ - activeTab, + activeTab = 0, items, name: nameProp, onChange, @@ -105,12 +105,4 @@ Tabs.propTypes = { onChange: PropTypes.func, }; -Tabs.defaultProps = { - activeTab: 0, - items: undefined, - linkComponent: undefined, - name: undefined, - onChange: undefined, -}; - export default Tabs; diff --git a/apps/climatemappedafrica/src/pages/explore/[[...slug]].js b/apps/climatemappedafrica/src/pages/explore/[[...slug]].js index d02793cef..60c2fbc14 100644 --- a/apps/climatemappedafrica/src/pages/explore/[[...slug]].js +++ b/apps/climatemappedafrica/src/pages/explore/[[...slug]].js @@ -11,9 +11,7 @@ import { } from "@/climatemappedafrica/lib/hurumap"; export default function Explore(props) { - const { - blocks: { tutorial, panel }, - } = props; + const { blocks: { tutorial = {}, panel = {} } = {} } = props; const { query: { showTutorial }, } = useRouter();