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:
@@ -2026,7 +2026,7 @@ export default function App() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<a
|
<a
|
||||||
href={`${API_HOST}/${doc.file_path}`}
|
href={`/${doc.file_path}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
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"
|
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"
|
||||||
|
|||||||
Reference in New Issue
Block a user