@@ -4,10 +4,10 @@ import ErrorSolutions from "./ErrorSolutions";
44import ErrorType from "./ErrorType" ;
55
66function ErrorCard ( { error } ) {
7-
7+
88 const [ showSolution , setShowSolution ] = useState ( false ) ;
99 const [ errorTypeColor , setErrorTypeColor ] = useState ( '#7e1aa5' ) ;
10- const [ readMore , setReadMore ] = useState ( false ) ;
10+ const [ readMore , setReadMore ] = useState ( false ) ;
1111 useEffect ( ( ) => {
1212 if ( error . type == "add" ) {
1313 return setErrorTypeColor ( "#4024e0" ) ;
@@ -31,16 +31,16 @@ function ErrorCard({ error }) {
3131 return (
3232 < div
3333 className = { `py-4 mb-4 col-span-12 md:col-span-6 xl:col-span-4 px-2 md:px-6 border-l-4 rounded-lg items-start bg-dark-secondary flex flex-col ${ item === "add"
34- ? "border-[#4024e0]"
35- : item === "commit"
36- ? "border-[#1a5ba5]"
37- : item === "merge"
38- ? "border-[#118d7c]"
39- : item === "push"
40- ? "border-[#8d54e1]"
41- : item === "branch"
42- ? "border-[#40E4F0]"
43- : "border-[#7e1aa5]"
34+ ? "border-[#4024e0]"
35+ : item === "commit"
36+ ? "border-[#1a5ba5]"
37+ : item === "merge"
38+ ? "border-[#118d7c]"
39+ : item === "push"
40+ ? "border-[#8d54e1]"
41+ : item === "branch"
42+ ? "border-[#40E4F0]"
43+ : "border-[#7e1aa5]"
4444 } `}
4545 >
4646 < h3 className = "text-lg font-medium" > { error . title } </ h3 >
@@ -53,11 +53,11 @@ function ErrorCard({ error }) {
5353 < ErrorSolutions solutions = { error . solutions } />
5454 ) : (
5555 < div className = "h-fit" >
56- < p className = "text-sm text-gray line-clamp-11 leading-relaxed" >
57- { readMore ? error . description : error . description . substring ( 0 , 100 ) }
58- { error . description . length > 100 ? < button onClick = { ( ) => { setReadMore ( ! readMore ) } } > { readMore ? '...show less' : '...show more' } </ button > : '' }
59- </ p >
60-
56+ < p className = "text-sm text-gray line-clamp-11 leading-relaxed" >
57+ { readMore ? error . description : error . description . substring ( 0 , 100 ) }
58+ { error . description . length > 100 ?< button onClick = { ( ) => { setReadMore ( ! readMore ) } } > { readMore ? '...show less' : '...show more' } </ button > : '' }
59+ </ p >
60+
6161 </ div >
6262 ) }
6363
0 commit comments