# Swagger console

import { useEffect } from "react";

{/*
  The Swagger console is a static page (public/swagger/index.html), outside the portal's router. A
  router link to it ends on the portal's "Page not found", and the dev server does not serve a
  folder's index.html for /swagger/. This page is a normal portal route: it loads the static console
  with a full page load, so the same link works locally and in production.
*/}

export const OpenSwaggerConsole = () => {
  useEffect(() => {
    window.location.replace("/swagger/index.html");
  }, []);

  return null;
};

<OpenSwaggerConsole />

Opening the Swagger console. If nothing happens, <a href="/swagger/index.html">open it here</a>.
