mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-01-14 17:08:00 -05:00
fix: delete the pages which won't load iframes
to not mess with next
This commit is contained in:
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user