Skip to content

Commit

Permalink
erreurs check silence
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTraveylan committed Sep 25, 2023
1 parent 7153d55 commit 36bdc58
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 1 addition & 6 deletions src/app/error.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
"use client"

import Image from "next/image"
import { useEffect } from "react"

export default function Error({ error, reset }: { error: Error; reset: () => void }) {
useEffect(() => {
console.log(error)
}, [error])

return (
<div className="text-center flex flex-col gap-3">
<div>{error.message}</div>
<div>Une erreur s'est produite !</div>
<Image src="/voleur.jpg" width={700} height={700} alt="Voleur assomé, coffre intact." />
</div>
)
Expand Down
2 changes: 0 additions & 2 deletions src/components/forms/check-password-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ export function CheckPasswordForm({ setIsSignIn }: { setIsSignIn: (value: boolea
})
router.push("/view-passwords")
} else {
const data: { error: string } = await response.json()
toast({
variant: "destructive",
title: "Oh, oh ! Une erreur s'est produite !",
description: `Raison : ${data.error}`,
})
}
}
Expand Down

0 comments on commit 36bdc58

Please sign in to comment.