Fix sidebar tooltip showing string with context metadata.

## Issue
In the odysee branch, the tooltip for "Following" in the Sidebar was shown as "Following --[sidebar]--". In lbry.tv, the tooltip doesn't appear.

I believe the tooltip appeared due to the name change from 'label' to 'title' and then being passed to Button through '...passedProps'.

Fix by explicitly setting the Button's 'title' to the localized text.
This commit is contained in:
infiinte-persistence 2020-11-10 04:32:50 +08:00 committed by Sean Yesmunt
parent fce6c17f4f
commit fc79c87bba

View file

@ -336,6 +336,7 @@ function SideNavigation(props: Props) {
<Button
{...passedProps}
label={__(linkProps.title)}
title={__(linkProps.title)}
// $FlowFixMe
navigate={linkProps.route || linkProps.link}
icon={pulseLibrary && linkProps.icon === ICONS.LIBRARY ? ICONS.PURCHASED : linkProps.icon}
@ -415,6 +416,7 @@ function SideNavigation(props: Props) {
{...passedProps}
navigate={route || link}
label={__(linkProps.title)}
title={__(linkProps.title)}
icon={pulseLibrary && linkProps.icon === ICONS.LIBRARY ? ICONS.PURCHASED : linkProps.icon}
className={classnames('navigation-link', {
'navigation-link--pulse': linkProps.icon === ICONS.LIBRARY && pulseLibrary,
@ -437,6 +439,7 @@ function SideNavigation(props: Props) {
{...passedProps}
navigate={linkProps.link}
label={__(linkProps.title)}
title={__(linkProps.title)}
className="navigation-link"
activeClass="navigation-link--active"
/>