import { BrowserRouter, Routes, Route, useLocation } from "react-router-dom";
import { useLayoutEffect } from "react";
import Editor from "./pages/Editor";
import BugReport from "./pages/BugReport";
import Templates from "./pages/Templates";
import LandingPage from "./pages/LandingPage";
import SettingsContextProvider from "./context/SettingsContext";
import NotFound from "./pages/NotFound";
import MigrationBanner, { isLegacyHost } from "./components/MigrationBanner";
export default function App() {
const routes = (
} />
} />
} />
} />
} />
} />
} />
);
return (
{isLegacyHost() ? (
) : (
routes
)}
);
}
function RestoreScroll() {
const location = useLocation();
useLayoutEffect(() => {
window.scroll(0, 0);
}, [location.pathname]);
return null;
}