import React, { useState, useEffect } from 'react'; import { CSSTransition } from 'react-transition-group'; import About from './GeolosysComponents/About'; import Datapacks from './GeolosysComponents/Datapacks'; import Config from './GeolosysComponents/Config'; import CT from './GeolosysComponents/CraftTweaker'; const extractComponentName = () => { const url = window.location.href; if (url.includes('#')) { return url.split('#')[1]; } return 'about'; }; export default () => { const [component, setComponent] = useState(extractComponentName()); useEffect(() => { setComponent(extractComponentName()); return () => { }; }, []); return (

Geolosys

{component === 'about' && ()} {component === 'datapacks' && ()} {component === 'config' && ()} {component === 'ct' && ()}
); };