Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[MINOR] fix(web): fix click table path (#1691)

CHEYNE99b63d6b1e62
diff --git a/web/app/ui/metalakes/TableView.js b/web/app/ui/metalakes/TableView.js
index a207895196..9765201c8f 100644
--- a/web/app/ui/metalakes/TableView.js
+++ b/web/app/ui/metalakes/TableView.js
@@ -32,7 +32,10 @@ const TableView = props => {
const [paginationModel, setPaginationModel] = useState(defaultPaginationConfig)
const store = useAppSelector(state => state.metalakes)
- const handleClickUrl = () => {
+ const handleClickUrl = path => {
+ if (!path) {
+ return
+ }
const [metalake, catalog, schema, table] = new URLSearchParams(path)
const id = `${(metalake && metalake[1]) ?? ''}${
@@ -66,9 +69,13 @@ const TableView = props => {
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<Typography
noWrap
- component={Link}
- href={path ?? '/'}
- onClick={() => handleClickUrl()}
+ {...(path
+ ? {
+ component: Link,
+ href: path
+ }
+ : {})}
+ onClick={() => handleClickUrl(path)}
sx={{
fontWeight: 400,
color: 'primary.main',