2022-08-16 02:49:15 +02:00
|
|
|
/* eslint-disable react/no-danger */
|
2022-09-07 09:00:28 +02:00
|
|
|
import { FC } from 'react';
|
2022-10-21 03:00:13 +02:00
|
|
|
import { useRecoilValue } from 'recoil';
|
|
|
|
import Footer from '../Footer/Footer';
|
2022-09-07 09:00:28 +02:00
|
|
|
import styles from './CustomPageContent.module.scss';
|
2022-10-21 03:00:13 +02:00
|
|
|
import { isMobileAtom, clientConfigStateAtom } from '../../stores/ClientConfigStore';
|
|
|
|
import { ClientConfig } from '../../../interfaces/client-config.model';
|
2022-07-11 01:42:35 +02:00
|
|
|
|
2022-09-07 09:00:28 +02:00
|
|
|
export type CustomPageContentProps = {
|
2022-04-28 08:19:20 +02:00
|
|
|
content: string;
|
2022-09-07 09:00:28 +02:00
|
|
|
};
|
2022-04-28 08:19:20 +02:00
|
|
|
|
2022-10-21 03:00:13 +02:00
|
|
|
export const CustomPageContent: FC<CustomPageContentProps> = ({ content }) => {
|
|
|
|
const isMobile = useRecoilValue<boolean | undefined>(isMobileAtom);
|
|
|
|
const clientConfig = useRecoilValue<ClientConfig>(clientConfigStateAtom);
|
|
|
|
const { version } = clientConfig;
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<div className={styles.pageContentContainer}>
|
|
|
|
<div className={styles.customPageContent} dangerouslySetInnerHTML={{ __html: content }} />
|
|
|
|
</div>
|
|
|
|
{isMobile && <Footer version={version} />}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|