Skip to content

Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.

426 B
Raw Blame
import { useEffect } from 'react';
import { useLocation } from 'react-router-dom';
import { docsUrl } from '../lib/docs';

// old links to the app's /docs pages land on the same page of the public docs
export default function DocsRedirect() {
  const { pathname, hash } = useLocation();
  useEffect(() => {
    window.location.replace(docsUrl(pathname.replace(/^\/docs/, '') + hash));
  }, [pathname, hash]);
  return null;
}