Skip to content

Commit

Permalink
chore(types): add some types instead of any
Browse files Browse the repository at this point in the history
  • Loading branch information
msyavuz committed Dec 23, 2024
1 parent f60a221 commit 03ab506
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
14 changes: 11 additions & 3 deletions superset-frontend/src/pages/AnnotationList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ function AnnotationList({
row: {
original: { start_dttm: startDttm },
},
}: any) => dayjs(new Date(startDttm)).format('ll'),
}: {
row: { original: AnnotationObject };
}) => dayjs(new Date(startDttm)).format('ll'),
Header: t('Start'),
accessor: 'start_dttm',
},
Expand All @@ -179,12 +181,18 @@ function AnnotationList({
row: {
original: { end_dttm: endDttm },
},
}: any) => dayjs(new Date(endDttm)).format('ll'),
}: {
row: { original: AnnotationObject };
}) => dayjs(new Date(endDttm)).format('ll'),
Header: t('End'),
accessor: 'end_dttm',
},
{
Cell: ({ row: { original } }: any) => {
Cell: ({
row: { original },
}: {
row: { original: AnnotationObject };
}) => {
const handleEdit = () => handleAnnotationEdit(original);
const handleDelete = () => setAnnotationCurrentlyDeleting(original);
const actions = [
Expand Down
9 changes: 7 additions & 2 deletions superset-frontend/src/pages/ExecutionLogList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
useSingleViewResource,
} from 'src/views/CRUD/hooks';
import { AlertObject, LogObject } from 'src/features/alerts/types';
import { AnnotationObject } from 'src/features/annotations/types';

const PAGE_SIZE = 25;

Expand Down Expand Up @@ -128,7 +129,9 @@ function ExecutionLog({
row: {
original: { start_dttm: startDttm },
},
}: any) => dayjs(new Date(startDttm)).format('YYYY-MM-DD hh:mm:ss a'),
}: {
row: { original: AnnotationObject };
}) => dayjs(new Date(startDttm)).format('YYYY-MM-DD hh:mm:ss a'),
Header: t('Start at (UTC)'),
accessor: 'start_dttm',
},
Expand All @@ -137,7 +140,9 @@ function ExecutionLog({
row: {
original: { start_dttm: startDttm, end_dttm: endDttm },
},
}: any) =>
}: {
row: { original: AnnotationObject };
}) =>
fDuration(new Date(startDttm).getTime(), new Date(endDttm).getTime()),
Header: t('Duration'),
disableSortBy: true,
Expand Down

0 comments on commit 03ab506

Please sign in to comment.