Skip to content

Commit

Permalink
style(HMS-4082): fix linter warnings
Browse files Browse the repository at this point in the history
So that the code is cleaner and they won't appear highlighted on
unrelated PRs.

Signed-off-by: Petr Vobornik <[email protected]>
  • Loading branch information
pvoborni authored and avisiedo committed May 14, 2024
1 parent d984558 commit 547698d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const InputFilterServer = (props: InputFilterServerProps) => {
</DropdownItem>,
];

const onChange = (value: string, event: React.FormEvent<HTMLInputElement>) => {
const onChange = (value: string) => {
setValue(value);
};

Expand Down
3 changes: 2 additions & 1 deletion src/Routes/DetailPage/DetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const DetailPage = () => {

const onKebabToggle = (
isOpen: boolean,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
event: MouseEvent | TouchEvent | KeyboardEvent | React.KeyboardEvent<any> | React.MouseEvent<HTMLButtonElement>
) => {
event.stopPropagation();
Expand Down Expand Up @@ -134,7 +135,7 @@ const DetailPage = () => {

// Tabs
const [activeTabKey, setActiveTabKey] = React.useState<string | number>(0);
const handleTabClick = (event: React.MouseEvent<any> | React.KeyboardEvent | MouseEvent, tabIndex: string | number) => {
const handleTabClick = (event: React.MouseEvent<HTMLElement, MouseEvent>, tabIndex: string | number) => {
setActiveTabKey(tabIndex);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ const PageServiceDetails = (props: PageServiceDetailsProps) => {
}
};

const onChangeTitle = (value: string, event: React.FormEvent<HTMLInputElement>) => {
const onChangeTitle = (value: string) => {
setTitle(value);
if (props.onChangeTitle) {
props.onChangeTitle(value);
}
};

const onChangeDescription = (value: string, event: React.ChangeEvent<HTMLTextAreaElement>) => {
const onChangeDescription = (value: string) => {
setDescription(value);
if (props.onChangeDescription) {
props.onChangeDescription(value);
Expand Down
10 changes: 2 additions & 8 deletions src/Routes/WizardPage/WizardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,14 @@ const WizardPage = () => {
};

/** Event triggered when Back button is clicked. */
const onPreviousPage = (
_newStep: { id?: string | number; name: React.ReactNode },
_prevStep: { prevId?: string | number; prevName: React.ReactNode }
) => {
const onPreviousPage = (_newStep: { id?: string | number; name: React.ReactNode }) => {
// TODO If not needed at the end clean-up onPreviousPage
console.log('onPreviousPage fired for id=' + _newStep.id);
return;
};

/** Event triggered when a specific page is clicked. */
const onGoToStep = (
_newStep: { id?: string | number; name: React.ReactNode },
_prevStep: { prevId?: string | number; prevName: React.ReactNode }
) => {
const onGoToStep = (_newStep: { id?: string | number; name: React.ReactNode }) => {
// TODO If not needed at the end clean-up onPreviousPage
console.log('onGoToStep fired' + _newStep.id);
return;
Expand Down

0 comments on commit 547698d

Please sign in to comment.