Fix rendering when trying to access server from state

This commit is contained in:
Dane Everitt 2020-08-22 19:05:43 -07:00
parent 813a671571
commit 56475d89bb
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 29 additions and 14 deletions

View file

@ -0,0 +1,19 @@
import useServer from '@/plugins/useServer';
import PageContentBlock, { PageContentBlockProps } from '@/components/elements/PageContentBlock';
import React from 'react';
interface Props extends PageContentBlockProps {
title: string;
}
const ServerContentBlock: React.FC<Props> = ({ title, children, ...props }) => {
const { name } = useServer();
return (
<PageContentBlock title={`${name} | ${title}`} {...props}>
{children}
</PageContentBlock>
);
};
export default ServerContentBlock;