Skip to content

Commit

Permalink
fix: datasetList empty display (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
huaxiabuluo authored May 23, 2023
1 parent 59b55fe commit ccc00f5
Showing 1 changed file with 29 additions and 28 deletions.
57 changes: 29 additions & 28 deletions app/pages/Welcome/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -418,28 +418,27 @@ function Welcome(props: IProps) {
<span className={cls(styles.title, module.beta && styles.beta)}>{module.title}</span>
<span className={styles.tip}>{module.tip}</span>
<div className={styles.actionWrapper}>
{
module.disabledTip ? (
<Tooltip title={module.disabledTip}>
<Button
className={styles.disabledAction}
disabled={!!module.startDisabled}
type="primary"
onClick={() => history.push(module.startLink)}
>
{intl.get('welcome.quickStart')}
</Button>
</Tooltip>
) : (
{module.disabledTip ? (
<Tooltip title={module.disabledTip}>
<Button
className={styles.action}
className={styles.disabledAction}
disabled={!!module.startDisabled}
type="primary"
onClick={() => history.push(module.startLink)}
>
{intl.get('welcome.quickStart')}
</Button>
)}
</Tooltip>
) : (
<Button
className={styles.action}
disabled={!!module.startDisabled}
type="primary"
onClick={() => history.push(module.startLink)}
>
{intl.get('welcome.quickStart')}
</Button>
)}

<Button className={cls(styles.action, styles.sub)} href={module.docLink} target="_blank">
{intl.get('welcome.quickStartDesc')}
Expand All @@ -451,19 +450,21 @@ function Welcome(props: IProps) {
))}
</Row>
</div>
<div className={styles.docBox}>
<div className={styles.header}>{intl.get('welcome.demos')}</div>
<Tabs
className={styles.tabTypeSet}
tabBarGutter={0}
animated={false}
type="card"
items={tabItems}
activeKey={datasetType}
onChange={(key) => setState({ datasetType: key as DatasetType })}
/>
{getTabItem(datasetType)}
</div>
{!!datasetList?.length && (
<div className={styles.docBox}>
<div className={styles.header}>{intl.get('welcome.demos')}</div>
<Tabs
className={styles.tabTypeSet}
tabBarGutter={0}
animated={false}
type="card"
items={tabItems}
activeKey={datasetType}
onChange={(key) => setState({ datasetType: key as DatasetType })}
/>
{getTabItem(datasetType)}
</div>
)}
{!!docList?.length && (
<div className={styles.docBox} style={{ paddingBottom: '24px' }}>
<div className={styles.header}>{intl.get('doc.learningDoc')}</div>
Expand Down

0 comments on commit ccc00f5

Please sign in to comment.