Skip to content

Commit ee634d6

Browse files
committed
Refresh User and change requests after connection request
1 parent b4adb2b commit ee634d6

2 files changed

Lines changed: 395 additions & 382 deletions

File tree

client/src/App.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,16 @@ const App = () => {
4949
const navigate = useNavigate();
5050
const currentLocation = useLocation();
5151

52-
const refreshUser = () => {
52+
const refreshUser = callback => {
5353
me()
5454
.then(user => {
5555
const currentOrganization = useAppStore.getState().currentOrganization
5656
const newMenuItems = menuItemsForUser(user, currentOrganization);
5757
useAppStore.setState(() => ({
5858
user: user,
5959
menuItems: newMenuItems
60-
}))
60+
}));
61+
callback && callback();
6162
})
6263
}
6364

0 commit comments

Comments
 (0)