Fix document View link using localhost instead of relative URL

The View button for documents was constructing the href as
API_HOST + file_path which resolved to http://localhost:3001/...
Since the frontend is served from the same Express server, this
should be a relative path. Users' browsers don't have localhost:3001
running, so the link was broken for anyone not on the server itself.
This commit is contained in:
Jordan Ramos
2026-05-22 12:56:45 -06:00
parent 60bb86f2ea
commit 8788b1e91a

View File

@@ -2026,7 +2026,7 @@ export default function App() {
</div>
<div className="flex gap-2">
<a
href={`${API_HOST}/${doc.file_path}`}
href={`/${doc.file_path}`}
target="_blank"
rel="noopener noreferrer"
className="px-3 py-1 text-sm text-intel-accent hover:bg-intel-medium rounded transition-all border border-intel-accent/50 font-mono uppercase tracking-wider"