2022-08-15 17:49:15 -07:00
|
|
|
/* eslint-disable react/no-danger */
|
2022-09-07 09:00:28 +02:00
|
|
|
import { FC } from 'react';
|
2022-10-20 18:00:13 -07: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-20 18:00:13 -07:00
|
|
|
import { isMobileAtom, clientConfigStateAtom } from '../../stores/ClientConfigStore';
|
|
|
|
import { ClientConfig } from '../../../interfaces/client-config.model';
|
2022-07-10 16:42:35 -07:00
|
|
|
|
2022-09-07 09:00:28 +02:00
|
|
|
export type CustomPageContentProps = {
|
2022-04-27 23:19:20 -07:00
|
|
|
content: string;
|
2022-09-07 09:00:28 +02:00
|
|
|
};
|
2022-04-27 23:19:20 -07:00
|
|
|
|
2022-10-20 18:00:13 -07: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} />}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|