feat: Ajout de la fratrie [#27]

This commit is contained in:
N3WT DE COMPET
2025-05-02 17:44:35 +02:00
parent 1ced4a1069
commit 4a382d523c
8 changed files with 279 additions and 30 deletions

View File

@ -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>