Merge pull request #5 from velocitatem/copilot/fix-404-page-sidebar-issue

fix: "404 page not found" in dashboard sidebar after login
This commit is contained in:
Daniel Alves Rösel
2026-04-04 10:48:26 +04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ import path from "node:path";
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
outputFileTracingRoot: path.join(process.cwd(), "../.."), outputFileTracingRoot: path.join(process.cwd(), "../.."),
async rewrites() { async rewrites() {
const backend = process.env.API_BASE_URL ?? "https://api.cv.alves.world"; const backend = process.env.API_BASE_URL ?? "http://localhost:9812";
return [{ source: "/api/:path*", destination: `${backend}/api/:path*` }]; return [{ source: "/api/:path*", destination: `${backend}/api/:path*` }];
}, },
}; };

View File

@@ -495,7 +495,7 @@ export default function Dashboard() {
setDocs(d); setDocs(d);
if (d.length) { setSelectedDocId(d[0].id); setSelectedVersionId(d[0].root_version_id ?? null); } if (d.length) { setSelectedDocId(d[0].id); setSelectedVersionId(d[0].root_version_id ?? null); }
}) })
.catch(e => setError(e.message)) .catch(() => setError('Failed to load documents. Make sure the backend is running.'))
.finally(() => setLoading(false)); .finally(() => setLoading(false));
}, []); }, []);