Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit a693397

Browse files
committed
fix: use dataproducttableiconmap in case there will be different icons for tables/views/mat views later
1 parent 2ba4e65 commit a693397

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

components/dataproducts/datasource/dataset.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import { Loader } from '@navikt/ds-react'
1010
import { ExpandFilled, NextFilled } from '@navikt/ds-icons'
1111
import Tabell from '../../lib/icons/tabell'
1212

13-
// const DataproductTableIconMap: Record<BigQueryType, JSX.Element> = {
14-
// materialized_view: Tabell,
15-
// table: Tabell,
16-
// view: Tabell,
17-
// }
13+
const DataproductTableIconMap: Record<BigQueryType, () => JSX.Element> = {
14+
materialized_view: Tabell,
15+
table: Tabell,
16+
view: Tabell,
17+
}
1818

1919
export interface DataproductSourceDatasetProps {
2020
active: boolean
@@ -52,7 +52,7 @@ export const Dataset = ({
5252
contents?.map(({ name, type }) => (
5353
<TreeItem
5454
className="MuiTreeView-leaf"
55-
slots={{ endIcon: Tabell}}
55+
slots={{ endIcon: DataproductTableIconMap[type]}}
5656
itemId={`${projectID}/${datasetID}/${name}`}
5757
key={`${projectID}/${datasetID}/${name}`}
5858
label={name}

0 commit comments

Comments
 (0)