Display message if user don't have tasks
This commit is contained in:
@@ -50,9 +50,14 @@ function ProfilePage() {
|
||||
</div>
|
||||
|
||||
<h2>Vos Événements :</h2>
|
||||
{user.tasks && user.tasks.map((task, index) => (
|
||||
<Task key={index} task={task} />
|
||||
))}
|
||||
{user.tasks && user.tasks.length > 0 ? (
|
||||
user.tasks.map((task, index) => (
|
||||
<Task key={index} task={task} />
|
||||
))
|
||||
) : (
|
||||
<p>Aucune tâche pour le moment.</p>
|
||||
)}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user