From 700607daf0c1b093400fbe5e680a7e465a46901e Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Fri, 6 Dec 2024 13:20:52 -0800 Subject: [PATCH] lint --- superset-frontend/src/SqlLab/actions/sqlLab.js | 2 +- .../src/SqlLab/components/QueryTable/index.tsx | 10 +++++++--- superset-frontend/src/components/Label/index.tsx | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.js b/superset-frontend/src/SqlLab/actions/sqlLab.js index 6549b8f2d8fc6..4fd7708338283 100644 --- a/superset-frontend/src/SqlLab/actions/sqlLab.js +++ b/superset-frontend/src/SqlLab/actions/sqlLab.js @@ -421,7 +421,7 @@ export function postStopQuery(query) { }) .then(() => dispatch(stopQuery(query))) .then(() => dispatch(addSuccessToast(t('Query was stopped.')))) - .catch(() => dispatch(addDangerToast(t('Failed at stopping query.')))); + .catch(() => dispatch(addDangerToast(t('Failed to stop query.')))); }; } diff --git a/superset-frontend/src/SqlLab/components/QueryTable/index.tsx b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx index 497eb9553ec88..38c93ed21f6a9 100644 --- a/superset-frontend/src/SqlLab/components/QueryTable/index.tsx +++ b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx @@ -16,11 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -import { useMemo } from 'react'; +import { useMemo, ReactNode } from 'react'; import moment from 'moment'; import Card from 'src/components/Card'; import ProgressBar from 'src/components/ProgressBar'; -import Label from 'src/components/Label'; import { t, useTheme, QueryResponse } from '@superset-ui/core'; import { useDispatch, useSelector } from 'react-redux'; @@ -45,11 +44,16 @@ import HighlightedSql from '../HighlightedSql'; import { StaticPosition, verticalAlign, StyledTooltip } from './styles'; interface QueryTableQuery - extends Omit { + extends Omit< + QueryResponse, + 'state' | 'sql' | 'progress' | 'results' | 'duration' | 'started' + > { state?: Record; sql?: Record; progress?: Record; results?: Record; + duration?: ReactNode; + started?: ReactNode; } interface QueryTableProps { diff --git a/superset-frontend/src/components/Label/index.tsx b/superset-frontend/src/components/Label/index.tsx index 6a80196ae561f..d904a445be830 100644 --- a/superset-frontend/src/components/Label/index.tsx +++ b/superset-frontend/src/components/Label/index.tsx @@ -122,7 +122,7 @@ export default function Label(props: LabelProps) { }, }; if (monospace) { - css.fontFamily = theme.typography.families.monospace; + css['font-family'] = theme.typography.families.monospace; } return (