Fixed no longer implicit children prop in FunctionalComponent type

This commit is contained in:
Alejandro Celaya
2022-04-24 10:39:11 +02:00
parent d5b1dc5bff
commit 271b19a4ec
28 changed files with 86 additions and 80 deletions

View File

@@ -1,17 +1,17 @@
import { Button, Card } from 'reactstrap';
import { FC, ReactNode } from 'react';
import { FC, PropsWithChildren, ReactNode } from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faArrowLeft } from '@fortawesome/free-solid-svg-icons';
import ShortUrlVisitsCount from '../short-urls/helpers/ShortUrlVisitsCount';
import { ShortUrl } from '../short-urls/data';
import { Visit } from './types';
interface VisitsHeaderProps {
type VisitsHeaderProps = PropsWithChildren<{
visits: Visit[];
goBack: () => void;
title: ReactNode;
shortUrl?: ShortUrl;
}
}>;
const VisitsHeader: FC<VisitsHeaderProps> = ({ visits, goBack, shortUrl, children, title }) => (
<header>