diff --git a/src/components/Accordion/Accordion.tsx b/src/components/Accordion/Accordion.tsx index c2353f9..59b3948 100644 --- a/src/components/Accordion/Accordion.tsx +++ b/src/components/Accordion/Accordion.tsx @@ -49,6 +49,7 @@ const Panel = styled.div<{ $visible?: boolean }>` interface AccordionProps { title: string; + children: React.ReactNode; } const Accordion: React.FC = ({ title, children }) => { diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 5c0ee99..26f41b9 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -6,6 +6,7 @@ interface ButtonProps { onClick: () => void; buttonStyle: "hero" | "filled" | "filter" | "bordered"; selected?: boolean; + children: React.ReactNode; } const StyledButton = styled.button<{ $selected?: boolean }>` diff --git a/src/components/DropDownBox.tsx b/src/components/DropDownBox.tsx index 9833ef4..51a2cf6 100644 --- a/src/components/DropDownBox.tsx +++ b/src/components/DropDownBox.tsx @@ -6,6 +6,7 @@ interface DropDownBoxProps { onMouseEnter: () => void; onMouseLeave: () => void; visible: boolean; + children: React.ReactNode; } const Box = styled.div` diff --git a/src/components/Hero/Hero.tsx b/src/components/Hero/Hero.tsx index 7da5e72..6217aa3 100644 --- a/src/components/Hero/Hero.tsx +++ b/src/components/Hero/Hero.tsx @@ -23,7 +23,11 @@ const Container = styled.div` } `; -const Hero: React.FC = ({ children }) => ( +type HeroProps = { + children: React.ReactNode; +}; + +const Hero: React.FC = ({ children }) => ( {children} diff --git a/src/components/Hero/HeroAside.tsx b/src/components/Hero/HeroAside.tsx index e19eca8..e4cd190 100644 --- a/src/components/Hero/HeroAside.tsx +++ b/src/components/Hero/HeroAside.tsx @@ -35,6 +35,7 @@ type Colors = "darkBlue" | "lightTurquoise"; interface HeroAsideProps { bgColor: Colors; + children: React.ReactNode; } // TODO: Color combos diff --git a/src/components/Hero/HeroPrimarySection.tsx b/src/components/Hero/HeroPrimarySection.tsx index e6f12be..c5e2c73 100644 --- a/src/components/Hero/HeroPrimarySection.tsx +++ b/src/components/Hero/HeroPrimarySection.tsx @@ -6,6 +6,7 @@ import breakpoints from "@theme/breakpoints"; interface HeroPrimarySectionProps { header: string; text?: string; + children?: React.ReactNode; } const Section = styled.section` diff --git a/src/components/Hero/HeroSecondarySection.tsx b/src/components/Hero/HeroSecondarySection.tsx index 9b343aa..0e016bd 100644 --- a/src/components/Hero/HeroSecondarySection.tsx +++ b/src/components/Hero/HeroSecondarySection.tsx @@ -22,6 +22,7 @@ const Item = styled.div` interface HeroSecondarySectionItemProps { note?: string; + children: React.ReactNode; } export const HeroSecondarySectionItem: React.FC = ({ note, children }) => ( @@ -52,6 +53,7 @@ const Items = styled.div` interface HeroSecondarySectionProps { heading: string; + children: React.ReactNode; } const HeroSecondarySection: React.FC = ({ heading, children }) => ( diff --git a/src/components/InfoBox.tsx b/src/components/InfoBox.tsx index 149d19b..b075740 100644 --- a/src/components/InfoBox.tsx +++ b/src/components/InfoBox.tsx @@ -6,7 +6,11 @@ const Box = styled.div` text-align: center; `; -const InfoBox: React.FC = ({ children }) => ( +type InfoBoxProps = { + children?: React.ReactNode +}; + +const InfoBox: React.FC = ({ children }) => ( {children} diff --git a/src/components/Link.tsx b/src/components/Link.tsx index d87430f..574cf98 100644 --- a/src/components/Link.tsx +++ b/src/components/Link.tsx @@ -2,6 +2,7 @@ import React from "react"; import NextJSLink, { LinkProps } from "next/link"; interface Props extends Omit { + children?: React.ReactNode; to: string; template?: string; target?: string; diff --git a/src/components/NavbarChildLink.tsx b/src/components/NavbarChildLink.tsx index ff894ea..523e65e 100644 --- a/src/components/NavbarChildLink.tsx +++ b/src/components/NavbarChildLink.tsx @@ -6,6 +6,7 @@ import { Link } from "@components/index"; interface NavbarChildLinkProps { to: string; + children: React.ReactNode; } const StyledLink = styled(Link)` diff --git a/src/components/NavbarDropdownLink.tsx b/src/components/NavbarDropdownLink.tsx index 1990cd0..6da7c7c 100644 --- a/src/components/NavbarDropdownLink.tsx +++ b/src/components/NavbarDropdownLink.tsx @@ -38,6 +38,7 @@ interface NavbarDropdownLinkProps { to: string; text: string; exploded?: boolean; // if exploded, show items directly underneath without a dropdown menu + children?: React.ReactNode; } const NavbarDropdownLink: React.FC = ({ diff --git a/src/components/PageLink.tsx b/src/components/PageLink.tsx index 5708ae7..bf1b3ae 100644 --- a/src/components/PageLink.tsx +++ b/src/components/PageLink.tsx @@ -6,6 +6,7 @@ import Link from "@components/Link"; interface PageLinkProps { to: string; desc: string; + children: React.ReactNode; } const StyledPageLink = styled.div` diff --git a/src/i18n/index.tsx b/src/i18n/index.tsx index 5857874..62a753f 100644 --- a/src/i18n/index.tsx +++ b/src/i18n/index.tsx @@ -67,8 +67,7 @@ const Reducer = (state: Store, action: Lang) => { }; const LocaleContext = createContext(initialState); - -const LocaleStore: React.FC = ({ children }) => { +const LocaleStore: React.FC<{ children?: React.ReactNode }> = ({ children }) => { const [state, dispatch] = useReducer(Reducer, initialState); const changeLanguage = (action: Lang) => { dispatch(action); diff --git a/src/views/ContactsPage/ContactsPageView.tsx b/src/views/ContactsPage/ContactsPageView.tsx index b9b5ddb..b408924 100644 --- a/src/views/ContactsPage/ContactsPageView.tsx +++ b/src/views/ContactsPage/ContactsPageView.tsx @@ -110,6 +110,7 @@ const TitleContainer = styled.div` const CommitteeContainer: React.FC<{ committee: Committee; + children: React.ReactNode; }> = ({ committee, children }) => ( diff --git a/src/views/admin/AdminListCommon.tsx b/src/views/admin/AdminListCommon.tsx index 7e7ec55..e246e9a 100644 --- a/src/views/admin/AdminListCommon.tsx +++ b/src/views/admin/AdminListCommon.tsx @@ -21,7 +21,11 @@ const Main = styled.div` } `; -const AdminListCommon: React.FC = ({ children }) => ( +type AdminListCommonProps = { + children: React.ReactNode; +}; + +const AdminListCommon: React.FC = ({ children }) => (
{children} diff --git a/src/views/common/AdminPageWrapper.tsx b/src/views/common/AdminPageWrapper.tsx index 26c6eae..75edc55 100644 --- a/src/views/common/AdminPageWrapper.tsx +++ b/src/views/common/AdminPageWrapper.tsx @@ -58,6 +58,7 @@ const useShouldRedirect = (enabled = true) => { type PageProps = { requiresAuthentication: boolean; + children: React.ReactNode; }; const AdminPageWrapper: React.FC = ({ requiresAuthentication, children }) => { diff --git a/src/views/common/PageWrapper.tsx b/src/views/common/PageWrapper.tsx index 3f2db7a..cff5d83 100644 --- a/src/views/common/PageWrapper.tsx +++ b/src/views/common/PageWrapper.tsx @@ -2,7 +2,11 @@ import React from "react"; import Header from "@components/Header"; import Footer from "@components/Footer/Footer"; -const PageWrapper: React.FC = ({ children }) => ( +type PageWrapperProps = { + children: React.ReactNode; +}; + +const PageWrapper: React.FC = ({ children }) => ( <>
{children}