Merge branch 'main' of https://gitlab.com/hanifsalafi/mediahub_redesign into prod
This commit is contained in:
commit
0a262d3c3e
|
|
@ -824,6 +824,19 @@ export default function FormTaskDetail() {
|
|||
// getColumn("judul")?.setFilterValue(e.target.value); // Set filter tabel
|
||||
};
|
||||
|
||||
const getViewerUrl = (url: string) => {
|
||||
const ext = url.split(".").pop()?.toLowerCase();
|
||||
|
||||
if (ext === "pdf") {
|
||||
return url; // langsung tampilkan PDF
|
||||
}
|
||||
|
||||
// doc / docx → pakai Google Viewer, lebih compatible
|
||||
return `https://docs.google.com/viewer?url=${encodeURIComponent(
|
||||
url
|
||||
)}&embedded=true`;
|
||||
};
|
||||
|
||||
return (
|
||||
<Card>
|
||||
{detail !== undefined ? (
|
||||
|
|
|
|||
Loading…
Reference in New Issue