mirror of
https://github.com/ConvoyPanel/panel.git
synced 2026-06-13 00:43:15 +08:00
23 lines
584 B
TypeScript
23 lines
584 B
TypeScript
import { AdminServerContext } from '@/state/admin/server'
|
|
|
|
import PageContentBlock, {
|
|
PageContentBlockProps,
|
|
} from '@/components/elements/PageContentBlock'
|
|
|
|
interface Props extends PageContentBlockProps {
|
|
title: string
|
|
}
|
|
|
|
const ServerContentBlock: React.FC<Props> = ({ title, children, ...props }) => {
|
|
const name = AdminServerContext.useStoreState(
|
|
state => state.server.data!.name
|
|
)
|
|
|
|
return (
|
|
<PageContentBlock title={`${title} | ${name}`} {...props}>
|
|
{children}
|
|
</PageContentBlock>
|
|
)
|
|
}
|
|
|
|
export default ServerContentBlock |