Files
pterodactyl-panel/resources/scripts/components/elements/ServerContentBlock.tsx
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

21 lines
693 B
TypeScript

import type { PageContentBlockProps } from '@/components/elements/PageContentBlock';
import PageContentBlock from '@/components/elements/PageContentBlock';
import { useCurrentServerName } from '@/api/server/queries';
interface Props extends PageContentBlockProps {
/** Shown after the server name in the document title; omit to leave the title alone. */
title?: string;
}
const ServerContentBlock = ({ title, children, ...props }: Props) => {
const name = useCurrentServerName()!;
return (
<PageContentBlock title={title ? `${name} | ${title}` : undefined} {...props}>
{children}
</PageContentBlock>
);
};
export default ServerContentBlock;