1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

refactor(ui/page-header): make docs url explicit [EE-5966] (#10411)

This commit is contained in:
Chaim Lev-Ari 2023-10-11 10:38:57 +03:00 committed by GitHub
parent 9e57530bde
commit 35dfde70de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 215 additions and 404 deletions

View file

@ -1,5 +1,6 @@
import { useRouter } from '@uirouter/react';
import { RefreshCw } from 'lucide-react';
import { PropsWithChildren } from 'react';
import { Button } from '../buttons';
@ -24,13 +25,10 @@ export function PageHeader({
reload,
loading,
onReload,
}: Props) {
children,
}: PropsWithChildren<Props>) {
const router = useRouter();
function onClickedRefresh() {
return onReload ? onReload() : router.stateService.reload();
}
return (
<HeaderContainer id={id}>
<Breadcrumbs breadcrumbs={breadcrumbs} />
@ -47,7 +45,12 @@ export function PageHeader({
<RefreshCw className="icon" />
</Button>
)}
{children}
</HeaderTitle>
</HeaderContainer>
);
function onClickedRefresh() {
return onReload ? onReload() : router.stateService.reload();
}
}