2020-08-23 04:05:43 +02:00
|
|
|
import PageContentBlock, { PageContentBlockProps } from '@/components/elements/PageContentBlock';
|
|
|
|
import React from 'react';
|
2020-08-26 06:25:31 +02:00
|
|
|
import { ServerContext } from '@/state/server';
|
2020-08-23 04:05:43 +02:00
|
|
|
|
|
|
|
interface Props extends PageContentBlockProps {
|
|
|
|
title: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const ServerContentBlock: React.FC<Props> = ({ title, children, ...props }) => {
|
2020-08-26 06:25:31 +02:00
|
|
|
const name = ServerContext.useStoreState(state => state.server.data!.name);
|
2020-08-23 04:05:43 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<PageContentBlock title={`${name} | ${title}`} {...props}>
|
|
|
|
{children}
|
|
|
|
</PageContentBlock>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ServerContentBlock;
|