Fix SidebarNavigation key errors

This commit is contained in:
infinite-persistence 2021-05-31 14:26:45 +08:00 committed by Jeremy Kauffman
parent 27a9f654d4
commit d6d1cf58e9

View file

@ -51,6 +51,7 @@ type Props = {
type SideNavLink = { type SideNavLink = {
title: string, title: string,
link?: string, link?: string,
route?: string,
onClick?: () => any, onClick?: () => any,
icon: string, icon: string,
extra?: Node, extra?: Node,
@ -60,7 +61,6 @@ type SideNavLink = {
function SideNavigation(props: Props) { function SideNavigation(props: Props) {
const { const {
subscriptions, subscriptions,
followedTags,
doSignOut, doSignOut,
email, email,
purchaseSuccess, purchaseSuccess,
@ -72,6 +72,7 @@ function SideNavigation(props: Props) {
unseenCount, unseenCount,
homepageData, homepageData,
user, user,
followedTags,
} = props; } = props;
const { EXTRA_SIDEBAR_LINKS } = homepageData; const { EXTRA_SIDEBAR_LINKS } = homepageData;
@ -292,7 +293,7 @@ function SideNavigation(props: Props) {
<Button label={__('FAQ')} href="https://odysee.com/@OdyseeHelp:b" /> <Button label={__('FAQ')} href="https://odysee.com/@OdyseeHelp:b" />
</li> </li>
<li className="navigation-link"> <li className="navigation-link">
<Button label={__('Support')} href="https://lbry.com/support" /> <Button label={__('Support --[used in footer; general help/support]--')} href="https://lbry.com/support" />
</li> </li>
<li className="navigation-link"> <li className="navigation-link">
<Button label={__('Terms')} href="https://lbry.com/termsofservice" /> <Button label={__('Terms')} href="https://lbry.com/termsofservice" />
@ -325,7 +326,7 @@ function SideNavigation(props: Props) {
// $FlowFixMe // $FlowFixMe
const { hideForUnauth, ...passedProps } = linkProps; const { hideForUnauth, ...passedProps } = linkProps;
return !email && linkProps.hideForUnauth && IS_WEB ? null : ( return !email && linkProps.hideForUnauth && IS_WEB ? null : (
<li key={linkProps.link}> <li key={linkProps.route || linkProps.link}>
<Button <Button
{...passedProps} {...passedProps}
label={__(linkProps.title)} label={__(linkProps.title)}