Refactor challenge access checks and update text encoding: Remove unnecessary session variable in update and delete challenge functions. Update text in ChallengeManagement and ChallengesSection components for proper HTML encoding, enhancing display consistency.
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m5s

This commit is contained in:
Julien Froidefond
2025-12-15 15:33:14 +01:00
parent f093977b34
commit 5e810202bb
4 changed files with 9 additions and 9 deletions

View File

@@ -196,7 +196,7 @@ export default function ChallengeManagement() {
{acceptedChallenges.length} défi{acceptedChallenges.length > 1 ? "s" : ""} en attente de validation
{pendingChallenges.length > 0 && (
<span className="ml-2">
{pendingChallenges.length} défi{pendingChallenges.length > 1 ? "s" : ""} en attente d'acceptation
{pendingChallenges.length} défi{pendingChallenges.length > 1 ? "s" : ""} en attente d&apos;acceptation
</span>
)}
</div>
@@ -241,7 +241,7 @@ export default function ChallengeManagement() {
? "bg-green-500/20 text-green-400"
: "bg-yellow-500/20 text-yellow-400"
}`}>
{challenge.status === "ACCEPTED" ? "Accepté" : "En attente d'acceptation"}
{challenge.status === "ACCEPTED" ? "Accepté" : "En attente d&apos;acceptation"}
</span>
</div>
{challenge.acceptedAt && (

View File

@@ -159,7 +159,7 @@ export default function ChallengesSection({ backgroundImage }: ChallengesSection
const getStatusLabel = (status: string) => {
switch (status) {
case "PENDING":
return "En attente d'acceptation";
return "En attente d&apos;acceptation";
case "ACCEPTED":
return "Accepté - En attente de validation admin";
case "COMPLETED":
@@ -308,7 +308,7 @@ export default function ChallengesSection({ backgroundImage }: ChallengesSection
) : challenges.length === 0 ? (
<Card variant="dark" className="p-6 text-center">
<p className="text-gray-400">
Vous n'avez aucun défi pour le moment.
Vous n&apos;avez aucun défi pour le moment.
</p>
</Card>
) : (