fix: delete the pages which won't load iframes

to not mess with next
This commit is contained in:
vidvidvid
2021-12-10 08:43:40 +01:00
committed by Alec LaLonde
parent 3a9d8e37d1
commit f044dffcaa
3 changed files with 0 additions and 111 deletions

View File

@@ -1,37 +0,0 @@
import { PageContainer } from 'components/Container';
import { HeadComponent } from 'components/Seo';
import React, { useEffect, useState } from 'react';
import { descriptions } from '../../utils/menuLinks';
const ForumPage: React.FC = () => {
// need to ensure that the menu height is calculated on client
const [isComponentMounted, setIsComponentMounted] = useState(false);
useEffect(() => setIsComponentMounted(true), []);
if (!isComponentMounted) {
return null;
}
const megamenuHeight =
document.getElementById('MegaMenu')?.offsetHeight || 81; // ugly solution, but i couldn't find a better way to set the right height of the iframe
return (
<PageContainer p={0} position="fixed">
<HeadComponent
title={`Forum`}
description={descriptions.forum}
url="https://forum.metagame.wtf/"
/>
<iframe
title="Forum"
src="https://forum.metagame.wtf/"
style={{
height: window.innerHeight - megamenuHeight,
width: `100%`,
}}
/>
</PageContainer>
);
};
export default ForumPage;

View File

@@ -1,37 +0,0 @@
import { PageContainer } from 'components/Container';
import { HeadComponent } from 'components/Seo';
import React, { useEffect, useState } from 'react';
import { descriptions } from '../../utils/menuLinks';
const ForumPage: React.FC = () => {
// need to ensure that the menu height is calculated on client
const [isComponentMounted, setIsComponentMounted] = useState(false);
useEffect(() => setIsComponentMounted(true), []);
if (!isComponentMounted) {
return null;
}
const megamenuHeight =
document.getElementById('MegaMenu')?.offsetHeight || 81; // ugly solution, but i couldn't find a better way to set the right height of the iframe
return (
<PageContainer p={0} position="fixed">
<HeadComponent
title={`Welcome to Metagame`}
description={descriptions.welcome}
url="https://meta-game.notion.site/meta-game/Welcome-to-MetaGame-7e28e75f3c264c7b939eaaa2239b9c28"
/>
<iframe
title="MetaWiki"
src="https://meta-game.notion.site/meta-game/Welcome-to-MetaGame-7e28e75f3c264c7b939eaaa2239b9c28"
style={{
height: window.innerHeight - megamenuHeight,
width: `100%`,
}}
/>
</PageContainer>
);
};
export default ForumPage;

View File

@@ -1,37 +0,0 @@
import { PageContainer } from 'components/Container';
import { HeadComponent } from 'components/Seo';
import React, { useEffect, useState } from 'react';
import { descriptions } from '../../utils/menuLinks';
const YoutubePage: React.FC = () => {
// need to ensure that the menu height is calculated on client
const [isComponentMounted, setIsComponentMounted] = useState(false);
useEffect(() => setIsComponentMounted(true), []);
if (!isComponentMounted) {
return null;
}
const megamenuHeight =
document.getElementById('MegaMenu')?.offsetHeight || 81; // ugly solution, but i couldn't find a better way to set the right height of the iframe
return (
<PageContainer p={0} position="fixed">
<HeadComponent
title={`Youtube`}
description={descriptions.forum}
url="https://www.youtube.com/metamedia/"
/>
<iframe
title="MetaWiki"
src="https://www.youtube.com/metamedia/"
style={{
height: window.innerHeight - megamenuHeight,
width: `100%`,
}}
/>
</PageContainer>
);
};
export default YoutubePage;