Skip to content

Commit

Permalink
update @pingcap-inc/tidb-community-site-components: update asktug/Cat…
Browse files Browse the repository at this point in the history
…egoryList preview
  • Loading branch information
cw1997 committed Dec 7, 2022
1 parent 4e53e46 commit 0e0864a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const CategoryList: React.FC<IProps> = (props) => {
const categories: ICategoryItem[] = data?.categories ?? []
return (
<Space className={classNames(className, 'asktug-category-list')} {...rest}>
{categories.map((value, index) => (
{categories.filter((value) => value.has_children === true).map((value, index) => (
<div key={value.name} className={'asktug-category-list-item-wrap'} style={{background: colors[index % colors.length].borderColor}}>
<div className={'asktug-category-list-item'} style={{background: colors[index % colors.length].backgroundColor}}>
<div className={'asktug-category-list-item-header'}>
Expand Down
1 change: 1 addition & 0 deletions packages/site-components/src/datasource/asktug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ export interface ICategoryItem {
name: string // "🪐 TiDB",
color: string // "25AAE2",
description: string // TiDB、TiKV、TiFlash、PD 等核心组件和监控组件如 Dashboard、Grafana、Prometheus、Alert Manager 等问题
has_children: boolean
}

export const useAsktugSite = () => {
Expand Down

0 comments on commit 0e0864a

Please sign in to comment.