mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-07-20 18:51:53 +00:00
Fixed no longer implicit children prop in FunctionalComponent type
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { isEmpty, propEq, values } from 'ramda';
|
||||
import { useState, useEffect, useMemo, FC, useRef } from 'react';
|
||||
import { useState, useEffect, useMemo, FC, useRef, PropsWithChildren } from 'react';
|
||||
import { Button, Progress, Row } from 'reactstrap';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faCalendarAlt, faMapMarkedAlt, faList, faChartPie } from '@fortawesome/free-solid-svg-icons';
|
||||
@@ -27,7 +27,7 @@ import { HighlightableProps, highlightedVisitsToStats } from './types/helpers';
|
||||
import { DoughnutChartCard } from './charts/DoughnutChartCard';
|
||||
import { SortableBarChartCard } from './charts/SortableBarChartCard';
|
||||
|
||||
export interface VisitsStatsProps {
|
||||
export type VisitsStatsProps = PropsWithChildren<{
|
||||
getVisits: (params: VisitsParams, doIntervalFallback?: boolean) => void;
|
||||
visitsInfo: VisitsInfo;
|
||||
settings: Settings;
|
||||
@@ -36,7 +36,7 @@ export interface VisitsStatsProps {
|
||||
domain?: string;
|
||||
exportCsv: (visits: NormalizedVisit[]) => void;
|
||||
isOrphanVisits?: boolean;
|
||||
}
|
||||
}>;
|
||||
|
||||
interface VisitsNavLinkProps {
|
||||
title: string;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Card, CardHeader, CardBody, CardFooter } from 'reactstrap';
|
||||
import { FC, ReactNode } from 'react';
|
||||
import { FC, PropsWithChildren, ReactNode } from 'react';
|
||||
import './ChartCard.scss';
|
||||
|
||||
interface ChartCardProps {
|
||||
type ChartCardProps = PropsWithChildren<{
|
||||
title: Function | string;
|
||||
footer?: ReactNode;
|
||||
}
|
||||
}>;
|
||||
|
||||
export const ChartCard: FC<ChartCardProps> = ({ title, footer, children }) => (
|
||||
<Card>
|
||||
|
||||
Reference in New Issue
Block a user