truong-leave-day #116

Merged
joseph merged 26 commits from truong-leave-day into dev 2025-06-10 12:51:32 +10:00
1 changed files with 12 additions and 4 deletions
Showing only changes of commit c6a9fc28a3 - Show all commits

View File

@ -103,8 +103,12 @@ const Document = () => {
if (['doc'].includes(extension!)) {
return (
<a
href={`${import.meta.env.VITE_BACKEND_URL}${uri}`}
download="Document Download"
href={`${import.meta.env.VITE_BACKEND_URL}${
import.meta.env.VITE_BACKEND_URL?.includes('localhost')
? ''
: 'image/'
}${uri}`}
download={row.title}
target="_self"
>
<IconFileTypeDoc style={{ color: '#1e62c1' }} />
@ -115,8 +119,12 @@ const Document = () => {
if (['xls', 'xlsx'].includes(extension!)) {
return (
<a
href={`${import.meta.env.VITE_BACKEND_URL}${uri}`}
download="Document Download"
href={`${import.meta.env.VITE_BACKEND_URL}${
import.meta.env.VITE_BACKEND_URL?.includes('localhost')
? ''
: 'image/'
}${uri}`}
download={row.title}
target="_self"
>
<IconFileTypeXls style={{ color: '#0e864b' }} />