From 53e96834f8b680248e75d6746042fb6e30549e2b Mon Sep 17 00:00:00 2001 From: SrGooglo Date: Tue, 22 Nov 2022 16:24:33 +0000 Subject: [PATCH] fullfill with logged username --- packages/app/src/App.jsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/app/src/App.jsx b/packages/app/src/App.jsx index 317aaf93..6cb18a85 100755 --- a/packages/app/src/App.jsx +++ b/packages/app/src/App.jsx @@ -334,6 +334,15 @@ class App extends React.Component { return window.app.setLocation(config.app.mainPath ?? "/home") }, goToAccount: (username) => { + if (!username) { + if (!app.userData) { + console.error("Cannot go to account, no username provided and no user logged in") + return false + } + + username = app.userData.username + } + return window.app.setLocation(`/@${username}`) }, goToPost: (id) => {