mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
feat: Ajout de la fratrie [#27]
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import React, { useState, useRef } from 'react';
|
||||
import { CloudUpload } from 'lucide-react';
|
||||
import logger from '@/utils/logger';
|
||||
import { BASE_URL } from '@/utils/Url';
|
||||
|
||||
export default function FileUpload({
|
||||
selectionMessage,
|
||||
@ -69,9 +70,18 @@ export default function FileUpload({
|
||||
<CloudUpload className="w-6 h-6 text-emerald-500" />
|
||||
<p className="text-sm font-medium text-gray-800">
|
||||
<span className="font-semibold">
|
||||
{typeof existingFile === 'string'
|
||||
? existingFile.split('/').pop()
|
||||
: existingFile?.name || 'Fichier inconnu'}
|
||||
{typeof existingFile === 'string' ? (
|
||||
<a
|
||||
href={`${BASE_URL}${existingFile}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-blue-500 hover:text-blue-700 underline"
|
||||
>
|
||||
{existingFile.split('/').pop()}
|
||||
</a>
|
||||
) : (
|
||||
existingFile?.name || 'Fichier inconnu'
|
||||
)}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user