mirror of
https://github.com/ConvoyPanel/panel.git
synced 2026-06-13 08:52:53 +08:00
21 lines
523 B
TypeScript
21 lines
523 B
TypeScript
import useNodeSWR from '@/api/admin/nodes/useNodeSWR'
|
|
|
|
import PageContentBlock, {
|
|
PageContentBlockProps,
|
|
} from '@/components/elements/PageContentBlock'
|
|
|
|
interface Props extends PageContentBlockProps {
|
|
title: string
|
|
}
|
|
|
|
const NodeContentBlock: React.FC<Props> = ({ title, children, ...props }) => {
|
|
const { data: node } = useNodeSWR()
|
|
|
|
return (
|
|
<PageContentBlock title={`${title} | ${node.name}`} {...props}>
|
|
{children}
|
|
</PageContentBlock>
|
|
)
|
|
}
|
|
|
|
export default NodeContentBlock |