mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 20:06:19 +00:00
ui: handle tab navigation if no access token (#14952)
* Handle navigation if no access token * remove dependency
This commit is contained in:
parent
908edc5eba
commit
e2db70c389
@ -101,6 +101,19 @@ const Users = ({ userData, queryFilters, updateUserDetails }: Props) => {
|
||||
setPreviewAsset(asset);
|
||||
}, []);
|
||||
|
||||
const handleTabRedirection = useCallback(() => {
|
||||
if (!isLoggedInUser && activeTab === UserPageTabs.ACCESS_TOKEN) {
|
||||
history.push({
|
||||
pathname: getUserPath(decodedUsername, UserPageTabs.ACTIVITY),
|
||||
search: location.search,
|
||||
});
|
||||
}
|
||||
}, [activeTab, decodedUsername, isLoggedInUser]);
|
||||
|
||||
useEffect(() => {
|
||||
handleTabRedirection();
|
||||
}, []);
|
||||
|
||||
const handlePersonaUpdate = useCallback(
|
||||
async (personas: EntityReference[]) => {
|
||||
await updateUserDetails({ ...userData, personas });
|
||||
|
Loading…
x
Reference in New Issue
Block a user