Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions apps/admin/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function Layout() {
<NavItem to="/data-catalog" label="Data catalog">
<MdAccountTree size={20} />
</NavItem>
<NavItem to="/" end label="Admin">
<NavItem to="/tasks" label="Tasks">
<MdAdminPanelSettings size={20} />
</NavItem>
</>
Expand All @@ -121,7 +121,8 @@ function App() {
<Route element={<Layout />}>
<Route path="/login" element={<LoginPage />} />
<Route element={<RequireAuth />}>
<Route path="/" element={<AdminPage />} />
<Route path="/" element={<Navigate to="/tables" replace />} />
<Route path="/tasks" element={<AdminPage />} />
<Route path="/merge-pgc" element={<AdminMergePgcPage />} />
<Route path="/tables" element={<TablesPage />} />
<Route path="/data-catalog" element={<DataCatalogPage />} />
Expand Down
6 changes: 3 additions & 3 deletions apps/admin/src/pages/Admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Link } from "@hyperleda/lib/ui";

const tasks = [
{
to: "merge-pgc",
to: "/merge-pgc",
title: "Merge PGC objects",
description:
"Reassign all records from a source PGC onto a surviving target PGC.",
Expand All @@ -12,12 +12,12 @@ const tasks = [

export function AdminPage(): ReactElement {
useEffect(() => {
document.title = "Admin | HyperLEDA";
document.title = "Tasks | HyperLEDA";
}, []);

return (
<div className="max-w-3xl">
<h2 className="text-3xl font-bold mb-4">Admin</h2>
<h2 className="text-3xl font-bold mb-4">Tasks</h2>
<ul className="flex flex-col gap-4">
{tasks.map((task) => (
<li key={task.to}>
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/src/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function LoginPage(): ReactElement {

setAuthToken(token);
setSuccess(true);
navigate("/");
navigate("/tables");
} catch (submitError) {
setError(`${submitError}`);
} finally {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SearchBar } from "./components/ui/Searchbar";

function adminRedirectPath(pathname: string): string {
if (pathname === "/admin" || pathname === "/admin/") {
return "/";
return "/tasks";
}
if (pathname.startsWith("/admin/")) {
return pathname.slice("/admin".length);
Expand Down
Loading