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:
parent
9e57530bde
commit
35dfde70de
15 changed files with 215 additions and 404 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue