Skip to content

Commit 162ce78

Browse files
committed
Removed redundant form element
1 parent a179541 commit 162ce78

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/modules/home/components/form/form.component.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { h } from 'preact';
1+
import { h, Fragment } from 'preact';
22
import { useState } from 'preact/hooks';
33
import style from './form.module.scss';
44

@@ -29,7 +29,7 @@ function Form({ title, className = '' }: IProps) {
2929
};
3030

3131
return (
32-
<form class={className} onSubmit={(event) => event.preventDefault()}>
32+
<Fragment>
3333
<h2 class={style.title}>{title}</h2>
3434
<label htmlFor="demo" class={style.label}>
3535
Type something:
@@ -46,7 +46,7 @@ function Form({ title, className = '' }: IProps) {
4646
<em>Value:</em> {value}
4747
</p>
4848
)}
49-
</form>
49+
</Fragment>
5050
);
5151
}
5252

src/modules/home/home.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
*
4545
* -------------------------------- */
4646

47-
.form {
47+
home-form {
4848
display: block;
4949
margin: 3em 0 0;
5050
}

0 commit comments

Comments
 (0)