add translate
This commit is contained in:
@@ -378,7 +378,7 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
||||
|
||||
const handleDownload = async (file: FileItem) => {
|
||||
setIsFileLoading(true);
|
||||
console.log(`download: ${file.id}`);
|
||||
|
||||
try {
|
||||
const response = await fetch(`/api/download/${file.id}`);
|
||||
|
||||
@@ -395,9 +395,9 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
document.body.removeChild(a);
|
||||
|
||||
toast.success(`${t('file-is-downloading')} - ${file.fileName}`);
|
||||
} catch (error) {
|
||||
toast.error('Не удалось скачать файл')
|
||||
toast.error(t('failed-to-download-file'))
|
||||
} finally {
|
||||
setIsFileLoading(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user