Skip to content

Commit

Permalink
feature: correcting lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Wallewdev committed Jul 21, 2024
1 parent 55bdd43 commit 276f27b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions app/routes/help-center.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ export default function HelpCenter() {
const [showDropdown, setShowDropdown] = useState(false);
const dropdownReference = useRef<HTMLDivElement>(null);

const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setQuery(e.target.value);
setShowDropdown(e.target.value.length > 0);
const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {
setQuery(event.target.value);
setShowDropdown(event.target.value.length > 0);
};

const handleTopicToggle = (index: number) => {
Expand All @@ -96,19 +96,19 @@ export default function HelpCenter() {
};

const handleKeyPressTopicToggle = (
e: React.KeyboardEvent<HTMLDivElement>,
event: React.KeyboardEvent<HTMLDivElement>,
index: number,
) => {
if (e.key === "Enter" || e.key === " ") {
if (event.key === "Enter" || event.key === " ") {
handleTopicToggle(index);
}
};

const handleKeyPressQuestionToggle = (
e: React.KeyboardEvent<HTMLDivElement>,
event: React.KeyboardEvent<HTMLDivElement>,
index: number,
) => {
if (e.key === "Enter" || e.key === " ") {
if (event.key === "Enter" || event.key === " ") {
handleQuestionToggle(index);
}
};
Expand All @@ -124,10 +124,10 @@ export default function HelpCenter() {
};

const handleDropdownKeyPress = (
e: React.KeyboardEvent<HTMLDivElement>,
event: React.KeyboardEvent<HTMLDivElement>,
topicIndex: number,
) => {
if (e.key === "Enter" || e.key === " ") {
if (event.key === "Enter" || event.key === " ") {
handleDropdownClick(topicIndex);
}
};
Expand Down Expand Up @@ -189,7 +189,7 @@ export default function HelpCenter() {
role="button"
tabIndex={0}
onClick={() => handleDropdownClick(index)}
onKeyDown={(e) => handleDropdownKeyPress(e, index)}
onKeyDown={(event) => handleDropdownKeyPress(event, index)}
>
{topic.topic}
</div>
Expand All @@ -215,7 +215,7 @@ export default function HelpCenter() {
role="button"
tabIndex={0}
onClick={() => handleTopicToggle(index)}
onKeyDown={(e) => handleKeyPressTopicToggle(e, index)}
onKeyDown={(event) => handleKeyPressTopicToggle(event, index)}
>
<div className="flex w-full items-center justify-between">
<p className="w-[90%] text-xl font-medium leading-[24.2px] text-[#0F172A]">
Expand Down Expand Up @@ -260,7 +260,7 @@ export default function HelpCenter() {
role="button"
tabIndex={0}
onClick={() => handleQuestionToggle(ind)}
onKeyDown={(e) => handleKeyPressQuestionToggle(e, ind)}
onKeyDown={(event) => handleKeyPressQuestionToggle(event, ind)}
>
<div className="flex w-full items-center justify-between">
<p className="w-[90%] font-medium leading-[24.2px]">
Expand Down

0 comments on commit 276f27b

Please sign in to comment.