Skip to content

Commit

Permalink
scroll to top, fix redirect for gateway detail
Browse files Browse the repository at this point in the history
* add return null

* scroll to top of details on nav from /list
  • Loading branch information
rustyjux authored Aug 28, 2024
1 parent 13ff2d0 commit c8ac094
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const NoGatewayRedirect = () => {
router.push('/manager/gateways/list');
}
}, [hasNamespace]);
return null
};

export default NoGatewayRedirect;
3 changes: 3 additions & 0 deletions src/nextapp/pages/manager/gateways/detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ const NamespacesPage: React.FC = () => {
text: 'Your Organization and Business Unit will appear here',
};
}, [namespace]);
useEffect(() => {
window.scrollTo(0, 0);
}, []);
const handleDelete = React.useCallback(async () => {
if (user?.namespace) {
toast({
Expand Down

0 comments on commit c8ac094

Please sign in to comment.