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