From ec320e8fb6fbab4271e43b66d61b90dc07b3fc0b Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 30 Aug 2022 00:53:20 +0300 Subject: add a favorites "timeline" shortcut --- src/components/navigation/navigation_entry.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/components/navigation/navigation_entry.js') diff --git a/src/components/navigation/navigation_entry.js b/src/components/navigation/navigation_entry.js index eb0a9cc4..fe3402fc 100644 --- a/src/components/navigation/navigation_entry.js +++ b/src/components/navigation/navigation_entry.js @@ -23,12 +23,14 @@ const NavigationEntry = { computed: { routeTo () { if (!this.item.route && !this.item.routeObject) return null + let route if (this.item.routeObject) { - return this.item.routeObject + route = this.item.routeObject + } else { + route = { name: (this.item.anon || this.currentUser) ? this.item.route : this.item.anonRoute } } - const route = { name: (this.item.anon || this.currentUser) ? this.item.route : this.item.anonRoute } if (USERNAME_ROUTES.has(route.name)) { - route.params = { username: this.currentUser.screen_name } + route.params = { username: this.currentUser.screen_name, name: this.currentUser.screen_name } } return route }, -- cgit v1.2.3-70-g09d2