mirror of
https://github.com/owncast/owncast.git
synced 2025-11-02 20:23:29 +08:00
Fix linter warnings
This commit is contained in:
@ -165,6 +165,11 @@ TextField.defaultProps = {
|
|||||||
tip: '',
|
tip: '',
|
||||||
type: TEXTFIELD_TYPE_TEXT,
|
type: TEXTFIELD_TYPE_TEXT,
|
||||||
value: '',
|
value: '',
|
||||||
|
|
||||||
|
pattern: '',
|
||||||
|
useTrim: false,
|
||||||
|
useTrimLead: false,
|
||||||
|
|
||||||
onSubmit: () => {},
|
onSubmit: () => {},
|
||||||
onBlur: () => {},
|
onBlur: () => {},
|
||||||
onChange: () => {},
|
onChange: () => {},
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
/* eslint-disable react/no-unused-prop-types */
|
/* eslint-disable react/no-unused-prop-types */
|
||||||
|
/* eslint-disable react/no-unstable-nested-components */
|
||||||
// TODO: This component should be cleaned up and usage should be re-examined. The types should be reconsidered as well.
|
// TODO: This component should be cleaned up and usage should be re-examined. The types should be reconsidered as well.
|
||||||
|
|
||||||
import { Typography, Statistic, Card, Progress } from 'antd';
|
import { Typography, Statistic, Card, Progress } from 'antd';
|
||||||
@ -26,9 +27,15 @@ const defaultProps = {
|
|||||||
formatter: null,
|
formatter: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
function ProgressView({ title, value, prefix, suffix, color }: StatisticItemProps) {
|
interface ContentProps {
|
||||||
const endColor = value > 90 ? 'red' : color;
|
prefix: string;
|
||||||
const content = (
|
value: any;
|
||||||
|
suffix: string;
|
||||||
|
title: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Content({ prefix, value, suffix, title }: ContentProps) {
|
||||||
|
return (
|
||||||
<div>
|
<div>
|
||||||
{prefix}
|
{prefix}
|
||||||
<div>
|
<div>
|
||||||
@ -42,6 +49,12 @@ function ProgressView({ title, value, prefix, suffix, color }: StatisticItemProp
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ProgressView({ title, value, prefix, suffix, color }: StatisticItemProps) {
|
||||||
|
const endColor = value > 90 ? 'red' : color;
|
||||||
|
const content = <Content prefix={prefix} value={value} suffix={suffix} title={title} />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Progress
|
<Progress
|
||||||
type="dashboard"
|
type="dashboard"
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable react/no-danger */
|
||||||
import s from './CustomPageContent.module.scss';
|
import s from './CustomPageContent.module.scss';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
Reference in New Issue
Block a user