Add labels in list card (#4837)
parent
ac1538baad
commit
e7b485f185
|
@ -44,7 +44,7 @@ type Props = {
|
||||||
export function Default(props: Props) {
|
export function Default(props: Props) {
|
||||||
const {view, showPinButton} = props
|
const {view, showPinButton} = props
|
||||||
return (
|
return (
|
||||||
<Link label={view.name} {...props}>
|
<Link {...props}>
|
||||||
<Outer>
|
<Outer>
|
||||||
<Header>
|
<Header>
|
||||||
<Avatar src={view.avatar} />
|
<Avatar src={view.avatar} />
|
||||||
|
@ -67,7 +67,7 @@ export function Link({
|
||||||
view,
|
view,
|
||||||
children,
|
children,
|
||||||
...props
|
...props
|
||||||
}: Props & Omit<LinkProps, 'to'>) {
|
}: Props & Omit<LinkProps, 'to' | 'label'>) {
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
|
|
||||||
const href = React.useMemo(() => {
|
const href = React.useMemo(() => {
|
||||||
|
@ -79,7 +79,7 @@ export function Link({
|
||||||
}, [view, queryClient])
|
}, [view, queryClient])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<InternalLink to={href} {...props}>
|
<InternalLink label={view.name} to={href} {...props}>
|
||||||
{children}
|
{children}
|
||||||
</InternalLink>
|
</InternalLink>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue