The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Convert SegmentFieldSidebar to TypeScript (#69090)
Fraser71e21281bb26
diff --git a/frontend/src/metabase/reference/segments/SegmentFieldSidebar.jsx b/frontend/src/metabase/reference/segments/SegmentFieldSidebar.tsxsimilarity index 72%rename from frontend/src/metabase/reference/segments/SegmentFieldSidebar.jsxrename to frontend/src/metabase/reference/segments/SegmentFieldSidebar.tsxindex 4620e7a492b..2927c83603e 100644--- a/frontend/src/metabase/reference/segments/SegmentFieldSidebar.jsx+++ b/frontend/src/metabase/reference/segments/SegmentFieldSidebar.tsx@@ -1,6 +1,3 @@-/* eslint "react/prop-types": "warn" */-import cx from "classnames";-import PropTypes from "prop-types";import { memo } from "react";import { t } from "ttag";@@ -8,9 +5,15 @@ import { Breadcrumbs } from "metabase/common/components/Breadcrumbs";import S from "metabase/common/components/Sidebar.module.css";import { SidebarItem } from "metabase/common/components/SidebarItem";import CS from "metabase/css/core/index.css";+import type { Field, Segment } from "metabase-types/api";-const SegmentFieldSidebar = ({ segment, field, style, className }) => (- <div className={cx(S.sidebar, className)} style={style}>+interface SegmentFieldSidebarProps {+ segment: Segment;+ field: Field;+}++const SegmentFieldSidebar = ({ segment, field }: SegmentFieldSidebarProps) => (+ <div className={S.sidebar}><ul className={CS.mx3}><div><Breadcrumbs@@ -34,12 +37,5 @@ const SegmentFieldSidebar = ({ segment, field, style, className }) => (</div>);-SegmentFieldSidebar.propTypes = {- segment: PropTypes.object,- field: PropTypes.object,- className: PropTypes.string,- style: PropTypes.object,-};-// eslint-disable-next-line import/no-default-export -- deprecated usageexport default memo(SegmentFieldSidebar);