diff --git a/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx b/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx index d2433c8944ab0..9dc0583b423de 100644 --- a/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx +++ b/superset-frontend/src/SqlLab/components/ColumnElement/index.tsx @@ -17,16 +17,10 @@ * under the License. */ import React from 'react'; -import PropTypes from 'prop-types'; import { ClassNames } from '@emotion/react'; import { styled, useTheme } from '@superset-ui/core'; - import { Tooltip } from 'src/components/Tooltip'; -const propTypes = { - column: PropTypes.object.isRequired, -}; - const StyledTooltip = (props: any) => { const theme = useTheme(); return ( @@ -64,6 +58,7 @@ const iconMap = { fk: 'fa-link', index: 'fa-bookmark', }; + const tooltipTitleMap = { pk: 'Primary key', fk: 'Foreign key', @@ -80,7 +75,7 @@ interface ColumnElementProps { }; } -export default function ColumnElement({ column }: ColumnElementProps) { +const ColumnElement = ({ column }: ColumnElementProps) => { let columnName: React.ReactNode = column.name; let icons; if (column.keys && column.keys.length > 0) { @@ -115,5 +110,6 @@ export default function ColumnElement({ column }: ColumnElementProps) { ); -} -ColumnElement.propTypes = propTypes; +}; + +export default ColumnElement;