Skip to content

Commit dddc054

Browse files
committed
error solution line85 break fixed
1 parent e7bc2d4 commit dddc054

2 files changed

Lines changed: 24 additions & 25 deletions

File tree

src/components/Search/SearchInput.jsx

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,20 @@ function SearchInput({ search, setSearch, setType }) {
3434
<ul className={`flex flex-col sm:flex-row mx-auto mt-2 items-start gap-4 py-3 px-6 rounded-lg bg-white w-full md:w-12/12 md:w-auto`}>
3535
{
3636
errorType.map((item, i) => (
37-
<li
38-
key={i}
39-
className={`${
40-
item === "add"
41-
? "bg-[#4024e0]"
42-
: item === "commit"
43-
? "bg-[#1a5ba5]"
44-
: item === "merge"
45-
? "bg-[#118d7c]"
46-
: item === "push"
47-
? "bg-[#8d54e1]"
48-
: item === "branch"
49-
? "bg-[#40E4F0]"
50-
: "bg-[#7e1aa5]"
51-
}
37+
<li
38+
key={i}
39+
className={`${item === "add"
40+
? "bg-[#4024e0]"
41+
: item === "commit"
42+
? "bg-[#1a5ba5]"
43+
: item === "merge"
44+
? "bg-[#118d7c]"
45+
: item === "push"
46+
? "bg-[#8d54e1]"
47+
: item === "branch"
48+
? "bg-[#40E4F0]"
49+
: "bg-[#7e1aa5]"
50+
}
5251
w-full md:w-auto rounded-md text-white font-bold py-1 px-3 cursor-pointer`}
5352
onClick={() => setType(item)}
5453
>{item}</li>
@@ -61,15 +60,15 @@ function SearchInput({ search, setSearch, setType }) {
6160
onClick={() => setOpen(!open)}>
6261
Filter By Type
6362
</button>
64-
<ul className={`animate flex flex-col sm:flex-row mx-auto mt-2 items-start gap-4 py-3 pt-4 px-6 rounded-lg bg-white w-[60vw] md:w-auto text-left ${open ? "hidden" : "block"}`}>
65-
{
66-
errorType.map((item, i) => (
67-
<li key={i} className={`${item === "add" ? "bg-[#4024e0]" : item === "commit" ? "bg-[#1a5ba5]" : item === "push" ? "bg-[#1aa0a5]" : "bg-[#7e1aa5]"} w-full md:w-auto rounded-md text-white font-bold py-2 px-3 cursor-pointer`}
68-
onClick={() => {setType(item); setOpen(!open)}}
69-
>{item}</li>
70-
))
71-
}
72-
</ul>
63+
<ul className={`animate flex flex-col sm:flex-row mx-auto mt-2 items-start gap-4 py-3 pt-4 px-6 rounded-lg bg-white w-[60vw] md:w-auto text-left ${open ? "hidden" : "block"}`}>
64+
{
65+
errorType.map((item, i) => (
66+
<li key={i} className={`${item === "add" ? "bg-[#4024e0]" : item === "commit" ? "bg-[#1a5ba5]" : item === "push" ? "bg-[#1aa0a5]" : "bg-[#7e1aa5]"} w-full md:w-auto rounded-md text-white font-bold py-2 px-3 cursor-pointer`}
67+
onClick={() => { setType(item); setOpen(!open) }}
68+
>{item}</li>
69+
))
70+
}
71+
</ul>
7372
</div>
7473
)
7574
}

src/data/error.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"type": "commit",
8383
"title": "Please enter the commit message for your changes",
8484
"description": "This error occurs when you attempt to commit changes to a Git repository without specifying a commit message, keep in mind it is also a good practice to include a more detailed explanation of the changes made in the commit message",
85-
"solutions": "git commit -m '<commit message>' "
85+
"solutions": "git commit -m \"commit message\""
8686
},
8787
{
8888
"type": "commit",

0 commit comments

Comments
 (0)