Skip to content

Commit fcdcd78

Browse files
committed
Add persistent Open in New Tab button to PDF viewer for reliability
1 parent c9ed12d commit fcdcd78

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

src/components/common/PDFViewer.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,32 @@ export default function PDFViewer({ fileUrl, fileName }: PDFViewerProps) {
262262
>
263263
<ZoomIn size={18} />
264264
</button>
265+
266+
{/* External Link Button - Always visible as fallback */}
267+
<a
268+
href={fileUrl}
269+
target="_blank"
270+
rel="noopener noreferrer"
271+
style={{
272+
padding: "0.5rem",
273+
background: "#e2e8f0",
274+
color: "#475569",
275+
border: "none",
276+
borderRadius: "4px",
277+
cursor: "pointer",
278+
display: "flex",
279+
alignItems: "center",
280+
textDecoration: "none",
281+
marginLeft: "0.5rem"
282+
}}
283+
title="Open in New Tab"
284+
>
285+
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
286+
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
287+
<polyline points="15 3 21 3 21 9"></polyline>
288+
<line x1="10" y1="14" x2="21" y2="3"></line>
289+
</svg>
290+
</a>
265291
</div>
266292
</div>
267293

0 commit comments

Comments
 (0)