mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-25 22:46:31 -04:00
34 lines
793 B
TypeScript
34 lines
793 B
TypeScript
import React from 'react';
|
|
import DocumentTitle from 'react-document-title';
|
|
import ErrorBoundary from 'Components/Error/ErrorBoundary';
|
|
import PageContentError from './PageContentError';
|
|
import styles from './PageContent.css';
|
|
|
|
interface PageContentProps {
|
|
className?: string;
|
|
title?: string;
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
function PageContent({
|
|
className = styles.content,
|
|
title,
|
|
children,
|
|
}: PageContentProps) {
|
|
return (
|
|
<ErrorBoundary errorComponent={PageContentError}>
|
|
<DocumentTitle
|
|
title={
|
|
title
|
|
? `${title} - ${window.Sonarr.instanceName}`
|
|
: window.Sonarr.instanceName
|
|
}
|
|
>
|
|
<div className={className}>{children}</div>
|
|
</DocumentTitle>
|
|
</ErrorBoundary>
|
|
);
|
|
}
|
|
|
|
export default PageContent;
|