File tree Expand file tree Collapse file tree 4 files changed +58
-0
lines changed Expand file tree Collapse file tree 4 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 4
4
"subtitle" : " أدخل رقم القضية لعرض تفاصيلها." ,
5
5
"button" : " بحث"
6
6
},
7
+ "error" : {
8
+ "title" : " حدث خطأ ما!" ,
9
+ "subtitle" : " القضية التي تبحث عنها غير موجودة بعد." ,
10
+ "button" : " حاول مرة أخرى"
11
+ },
7
12
"case" : {
8
13
"title" : " القضية" ,
9
14
"question" : {
Original file line number Diff line number Diff line change 4
4
"subtitle" : " Enter the case number to view its details." ,
5
5
"button" : " Search"
6
6
},
7
+ "error" : {
8
+ "title" : " Something went wrong!" ,
9
+ "subtitle" : " The case you are looking for doesn't exist yet." ,
10
+ "button" : " Try again"
11
+ },
7
12
"case" : {
8
13
"title" : " CASE" ,
9
14
"question" : {
Original file line number Diff line number Diff line change 4
4
"subtitle" : " Introduzca el número del caso para ver los detalles." ,
5
5
"button" : " Buscar"
6
6
},
7
+ "error" : {
8
+ "title" : " Algo salió mal" ,
9
+ "subtitle" : " El caso que estás buscando no existe aún." ,
10
+ "button" : " Vuelva a intentarlo"
11
+ },
7
12
"case" : {
8
13
"title" : " CASO" ,
9
14
"question" : {
Original file line number Diff line number Diff line change
1
+ "use client" ;
2
+
3
+ import React from "react" ;
4
+
5
+ import clsx from "clsx" ;
6
+ import { useLocale , useTranslations } from "next-intl" ;
7
+ import Link from "next/link" ;
8
+
9
+ export default function Error ( {
10
+ error : _ ,
11
+ reset : __ ,
12
+ } : {
13
+ error : Error & { digest ?: string } ;
14
+ reset : ( ) => void ;
15
+ } ) {
16
+ // useEffect(() => {
17
+ // // Log the error to an error reporting service
18
+ // console.error(error)
19
+ // }, [error])
20
+
21
+ const t = useTranslations ( "error" ) ;
22
+ const locale = useLocale ( ) ;
23
+
24
+ return (
25
+ < div className = "mx-auto my-auto flex flex-col justify-center items-center" >
26
+ < h2 className = "text-secondary-text text-xl font-bold text-center mb-4" >
27
+ { t ( "title" ) }
28
+ </ h2 >
29
+ < h3 className = "text-secondary-text text-md text-center mb-4" >
30
+ { t ( "subtitle" ) }
31
+ </ h3 >
32
+ < Link
33
+ href = { `/${ locale } ` }
34
+ className = { clsx (
35
+ "rounded bg-primary-blue hover:bg-secondary-blue transition w-max" ,
36
+ "px-6 py-2 text-white-background font-semibold" ,
37
+ ) }
38
+ >
39
+ { t ( "button" ) }
40
+ </ Link >
41
+ </ div >
42
+ ) ;
43
+ }
You can’t perform that action at this time.
0 commit comments