Experiment with showing footer on about tab for mobile

This commit is contained in:
Gabe Kangas 2022-10-20 18:00:13 -07:00
parent 9c4d2b0356
commit c6364959c9
No known key found for this signature in database
GPG key ID: 9A56337728BC81EA
3 changed files with 18 additions and 10 deletions

View file

@ -312,7 +312,7 @@ export const Content: FC = () => {
{showChat && !isMobile && <Sidebar />}
</AntContent>
</Spin>
{(!isMobile || !showChat) && <Footer version={version} />}
{!isMobile && <Footer version={version} />}
</div>
);
};

View file

@ -1,13 +1,25 @@
/* eslint-disable react/no-danger */
import { FC } from 'react';
import { useRecoilValue } from 'recoil';
import Footer from '../Footer/Footer';
import styles from './CustomPageContent.module.scss';
import { isMobileAtom, clientConfigStateAtom } from '../../stores/ClientConfigStore';
import { ClientConfig } from '../../../interfaces/client-config.model';
export type CustomPageContentProps = {
content: string;
};
export const CustomPageContent: FC<CustomPageContentProps> = ({ content }) => (
<div className={styles.pageContentContainer}>
<div className={styles.customPageContent} dangerouslySetInnerHTML={{ __html: content }} />
</div>
);
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} />}
</>
);
};

View file

@ -12,10 +12,6 @@
font-weight: 600;
border-top: 1px solid rgba(214, 211, 211, 0.5);
@media (max-width: 600px) {
display: none;
}
a {
color: var(--theme-text-secondary);
}