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