diff --git a/app/components/Analytics.ts b/app/components/Analytics.ts index 1bf1e5d94..044c6718f 100644 --- a/app/components/Analytics.ts +++ b/app/components/Analytics.ts @@ -2,11 +2,7 @@ import * as React from "react"; import env from "~/env"; -type Props = { - children?: React.ReactNode; -}; - -export default class Analytics extends React.Component { +export default class Analytics extends React.Component { componentDidMount() { if (!env.GOOGLE_ANALYTICS_ID) { return; diff --git a/app/components/AuthenticatedLayout.tsx b/app/components/AuthenticatedLayout.tsx index 11ad15b11..50d9c1c96 100644 --- a/app/components/AuthenticatedLayout.tsx +++ b/app/components/AuthenticatedLayout.tsx @@ -34,10 +34,7 @@ const CommandBar = React.lazy( ) ); -type Props = WithTranslation & - RootStore & { - children?: React.ReactNode; - }; +type Props = WithTranslation & RootStore; @observer class AuthenticatedLayout extends React.Component { diff --git a/app/components/Breadcrumb.tsx b/app/components/Breadcrumb.tsx index 7ad14c482..b0c3d205e 100644 --- a/app/components/Breadcrumb.tsx +++ b/app/components/Breadcrumb.tsx @@ -9,11 +9,15 @@ import { MenuInternalLink } from "~/types"; type Props = { items: MenuInternalLink[]; max?: number; - children?: React.ReactNode; highlightFirstItem?: boolean; }; -function Breadcrumb({ items, highlightFirstItem, children, max = 2 }: Props) { +function Breadcrumb({ + items, + highlightFirstItem, + children, + max = 2, +}: React.PropsWithChildren) { const totalItems = items.length; const topLevelItems: MenuInternalLink[] = [...items]; let overflowItems; diff --git a/app/components/ButtonLink.tsx b/app/components/ButtonLink.tsx index 4c14c1664..4d3463928 100644 --- a/app/components/ButtonLink.tsx +++ b/app/components/ButtonLink.tsx @@ -3,10 +3,9 @@ import styled from "styled-components"; type Props = { onClick?: React.MouseEventHandler; - children: React.ReactNode; }; -const ButtonLink = React.forwardRef( +const ButtonLink: React.FC = React.forwardRef( (props: Props, ref: React.Ref) => { return