import { useLayoutEffect } from 'preact/hooks'; import { useLocation } from 'react-router-dom'; import Link from '../components/link'; import getInstanceStatusURL from '../utils/get-instance-status-url'; export default function HttpRoute() { const location = useLocation(); const url = location.pathname.replace(/^\//, ''); const statusURL = getInstanceStatusURL(url); useLayoutEffect(() => { if (statusURL) { setTimeout(() => { window.location.hash = statusURL + '?view=full'; }, 300); } }, [statusURL]); return (
); }