2020-12-27 11:18:33 -08:00
|
|
|
import React, { useEffect } from 'react';
|
2020-04-17 11:07:32 -07:00
|
|
|
import ContentContainer from '@/components/elements/ContentContainer';
|
2026-10-05 18:10:18 -04:00
|
|
|
import { cn } from '@/lib/cn';
|
2020-04-17 11:07:32 -07:00
|
|
|
|
2020-08-22 19:05:43 -07:00
|
|
|
export interface PageContentBlockProps {
|
2020-08-22 15:43:28 -07:00
|
|
|
title?: string;
|
|
|
|
|
className?: string;
|
2026-10-05 18:10:18 -04:00
|
|
|
children?: React.ReactNode;
|
2020-08-22 15:43:28 -07:00
|
|
|
}
|
|
|
|
|
|
2026-10-05 18:10:18 -04:00
|
|
|
const PageContentBlock = ({ title, className, children }: PageContentBlockProps) => {
|
2020-12-27 11:18:33 -08:00
|
|
|
useEffect(() => {
|
2026-10-05 18:10:18 -04:00
|
|
|
document.title = title || document.title;
|
2022-06-26 15:13:52 -04:00
|
|
|
}, [title]);
|
2020-12-27 11:18:33 -08:00
|
|
|
|
2020-08-22 15:43:28 -07:00
|
|
|
return (
|
2026-10-05 18:10:18 -04:00
|
|
|
<div>
|
|
|
|
|
<ContentContainer className={cn('my-4 sm:my-6', className)}>{children}</ContentContainer>
|
|
|
|
|
<ContentContainer className={'mb-4'}>
|
|
|
|
|
<p className={'text-center text-muted-foreground text-xs'}>
|
|
|
|
|
<a
|
|
|
|
|
rel={'noopener nofollow noreferrer'}
|
|
|
|
|
href={'https://pterodactyl.io'}
|
|
|
|
|
target={'_blank'}
|
|
|
|
|
className={'no-underline text-muted-foreground hover:text-muted-foreground'}
|
|
|
|
|
>
|
|
|
|
|
Pterodactyl®
|
|
|
|
|
</a>
|
|
|
|
|
© 2015 - <span suppressHydrationWarning>{new Date().getFullYear()}</span>
|
|
|
|
|
</p>
|
|
|
|
|
</ContentContainer>
|
|
|
|
|
</div>
|
2020-08-22 15:43:28 -07:00
|
|
|
);
|
|
|
|
|
};
|
2020-07-04 09:28:03 -07:00
|
|
|
|
|
|
|
|
export default PageContentBlock;
|