Fix 'pinnedUrl' error.

Part of "6989 Fix console spam in dev"

EXTRA_SIDEBAR_LINKS should be a `SideNavLink` object, so trim down the return object from `GetLinksData`.
This commit is contained in:
infinite-persistence 2021-10-02 15:06:13 +08:00
parent 4f07867f8f
commit 11c9a53872
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -75,7 +75,8 @@ function SideNavigation(props: Props) {
followedTags,
} = props;
const EXTRA_SIDEBAR_LINKS = GetLinksData(homepageData);
const EXTRA_SIDEBAR_LINKS = GetLinksData(homepageData).map(({ pinnedUrls, ...theRest }) => theRest);
const FULL_LINKS: Array<SideNavLink> = [
{
title: 'Your Tags',