Skip to content

Commit 1d10974

Browse files
committed
chore: show icon for new tiles
1 parent 63e6a42 commit 1d10974

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

packages/frontend/src/pages/Tile/components/TableBanner/BreadCrumb.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useCallback } from 'react'
2+
import { BiTable } from 'react-icons/bi'
23
import { FaChevronRight } from 'react-icons/fa'
34
import { Link } from 'react-router-dom'
45
import {
@@ -10,12 +11,17 @@ import {
1011

1112
import EditableInput from '@/components/EditableInput'
1213
import * as URLS from '@/config/urls'
14+
import { DatabaseType } from '@/graphql/__generated__/graphql'
1315

1416
import { useTableContext } from '../../contexts/TableContext'
1517
import { useUpdateTable } from '../../hooks/useUpdateTable'
1618

1719
function BreadCrumb() {
18-
const { tableName: initialTableName, hasEditPermission } = useTableContext()
20+
const {
21+
tableName: initialTableName,
22+
hasEditPermission,
23+
databaseType,
24+
} = useTableContext()
1925
const { updateTableName } = useUpdateTable()
2026

2127
const onSave = useCallback(
@@ -31,8 +37,14 @@ function BreadCrumb() {
3137
separator={<Icon as={FaChevronRight} color="secondary.300" h={3} />}
3238
>
3339
<BreadcrumbItem>
34-
<BreadcrumbLink as={Link} to={URLS.TILES}>
35-
Tiles
40+
<BreadcrumbLink
41+
as={Link}
42+
to={URLS.TILES}
43+
display="flex"
44+
alignItems="center"
45+
gap={2}
46+
>
47+
{databaseType === DatabaseType.Pg && <Icon as={BiTable} />} Tiles
3648
</BreadcrumbLink>
3749
</BreadcrumbItem>
3850
<EditableInput

0 commit comments

Comments
 (0)