Format all files with no breaking changes
Lint all files using `npm run lint -- --fix`.
Format all files using `prettier --write "**/*.{ts,tsx,js,jsx,json}"`
No breaking change, only code style is modified.
Gitlab: #29
Change-Id: I4f034a7fb4d3eea10bcd3e38b44a65a1046de62f
diff --git a/client/src/components/NewContactForm.js b/client/src/components/NewContactForm.js
index 9482948..db0ce31 100644
--- a/client/src/components/NewContactForm.js
+++ b/client/src/components/NewContactForm.js
@@ -1,32 +1,34 @@
-import { useState } from 'react'
+import { useState } from 'react';
import { InputBase, InputAdornment } from '@mui/material';
import { SearchRounded } from '@mui/icons-material';
export default function NewContactForm(props) {
- const [value, setValue] = useState('')
+ const [value, setValue] = useState('');
- const handleChange = event => {
- setValue(event.target.value)
- if (props.onChange)
- props.onChange(event.target.value)
- }
+ const handleChange = (event) => {
+ setValue(event.target.value);
+ if (props.onChange) props.onChange(event.target.value);
+ };
- const handleSubmit = event => {
- event.preventDefault()
- if (value && props.onSubmit)
- props.onSubmit(value)
- }
+ const handleSubmit = (event) => {
+ event.preventDefault();
+ if (value && props.onSubmit) props.onSubmit(value);
+ };
- return (
- <form className="main-search" onSubmit={handleSubmit} noValidate autoComplete="off">
- <InputBase
- className="main-search-input"
- type="search"
- placeholder="Ajouter un contact"
- value={value}
- onChange={handleChange}
- startAdornment={<InputAdornment position="start"><SearchRounded /></InputAdornment>}
- />
- </form>
- )
+ return (
+ <form className="main-search" onSubmit={handleSubmit} noValidate autoComplete="off">
+ <InputBase
+ className="main-search-input"
+ type="search"
+ placeholder="Ajouter un contact"
+ value={value}
+ onChange={handleChange}
+ startAdornment={
+ <InputAdornment position="start">
+ <SearchRounded />
+ </InputAdornment>
+ }
+ />
+ </form>
+ );
}