Add labels in feed card (#4836)
parent
1d827cebe4
commit
35165e3d9b
|
@ -40,7 +40,7 @@ type Props = {
|
||||||
export function Default(props: Props) {
|
export function Default(props: Props) {
|
||||||
const {view} = props
|
const {view} = props
|
||||||
return (
|
return (
|
||||||
<Link label={view.displayName} {...props}>
|
<Link {...props}>
|
||||||
<Outer>
|
<Outer>
|
||||||
<Header>
|
<Header>
|
||||||
<Avatar src={view.avatar} />
|
<Avatar src={view.avatar} />
|
||||||
|
@ -58,7 +58,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(() => {
|
||||||
|
@ -70,7 +70,11 @@ export function Link({
|
||||||
}, [view, queryClient])
|
}, [view, queryClient])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<InternalLink to={href} style={[a.flex_col]} {...props}>
|
<InternalLink
|
||||||
|
label={view.displayName}
|
||||||
|
to={href}
|
||||||
|
style={[a.flex_col]}
|
||||||
|
{...props}>
|
||||||
{children}
|
{children}
|
||||||
</InternalLink>
|
</InternalLink>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue