This is an automated email from the ASF dual-hosted git repository. yjc pushed a commit to branch home-screen-mvp in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit 46b9cf438195e216161ae170aaf745f2002e42eb Author: Phillip Kelley-Dotson <[email protected]> AuthorDate: Sun Oct 25 22:25:03 2020 -0700 fix pesky type errors --- superset-frontend/src/components/ListViewCard/index.tsx | 4 ++-- superset-frontend/src/components/Menu/SubMenu.tsx | 2 +- superset-frontend/src/views/CRUD/hooks.ts | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/superset-frontend/src/components/ListViewCard/index.tsx b/superset-frontend/src/components/ListViewCard/index.tsx index 02f60f6..b4350bd 100644 --- a/superset-frontend/src/components/ListViewCard/index.tsx +++ b/superset-frontend/src/components/ListViewCard/index.tsx @@ -202,8 +202,8 @@ function ListViewCard({ <a href={url}> <div className="gradient-container"> <ImageLoader - src={imgURL} - fallback={imgFallbackURL} + src={imgURL || ''} + fallback={imgFallbackURL || ''} isLoading={loading} position={imgPosition} /> diff --git a/superset-frontend/src/components/Menu/SubMenu.tsx b/superset-frontend/src/components/Menu/SubMenu.tsx index f58c2bd..db9767b 100644 --- a/superset-frontend/src/components/Menu/SubMenu.tsx +++ b/superset-frontend/src/components/Menu/SubMenu.tsx @@ -131,7 +131,7 @@ const SubMenu: React.FunctionComponent<SubMenuProps> = props => { key={`${tab.label}`} > <div> - <Link to={tab.url}>{tab.label}</Link> + <Link to={tab.url || ''}>{tab.label}</Link> </div> </li> ); diff --git a/superset-frontend/src/views/CRUD/hooks.ts b/superset-frontend/src/views/CRUD/hooks.ts index 1261a5e..b083bde 100644 --- a/superset-frontend/src/views/CRUD/hooks.ts +++ b/superset-frontend/src/views/CRUD/hooks.ts @@ -21,9 +21,8 @@ import { useState, useEffect, useCallback, useRef } from 'react'; import { SupersetClient, t } from '@superset-ui/core'; import { createErrorHandler } from 'src/views/CRUD/utils'; -import { Slice } from 'src/explore/components/PropertiesModal'; import { FetchDataConfig } from 'src/components/ListView'; -import Chart from 'src/types/Chart'; +import Chart, { Slice } from 'src/types/Chart'; import { FavoriteStatus } from './types'; interface ListViewResourceState<D extends object = any> {
