forked from polka_billy/porridger
Code styling
Added brackets for const lambdas Converted const lambdas with multiple instructions to functions
This commit is contained in:
@ -8,8 +8,9 @@ type AuthFormProps = {
|
||||
error: string
|
||||
}
|
||||
|
||||
const AuthForm = ({ handleAuth, register, loading, error }: AuthFormProps) => {
|
||||
function AuthForm ({ handleAuth, register, loading, error }: AuthFormProps) {
|
||||
const buttonText = loading ? 'Загрузка...' : (error || (register ? 'Зарегистрироваться' : 'Войти'))
|
||||
|
||||
return (
|
||||
<Form onSubmit={handleAuth}>
|
||||
<Form.Group className='mb-3' controlId='email'>
|
||||
|
@ -10,7 +10,7 @@ type LocationMarkerProps = {
|
||||
setPosition: SetState<LatLng>
|
||||
}
|
||||
|
||||
const LocationMarker = ({ address, position, setPosition }: LocationMarkerProps) => {
|
||||
function LocationMarker({ address, position, setPosition }: LocationMarkerProps) {
|
||||
|
||||
const map = useMapEvents({
|
||||
dragend: () => {
|
||||
|
@ -8,7 +8,7 @@ type TrashboxMarkersProps = {
|
||||
selectTrashbox: ({ index, category }: { index: number, category: string }) => void
|
||||
}
|
||||
|
||||
const TrashboxMarkers = ({ trashboxes, selectTrashbox }: TrashboxMarkersProps) => {
|
||||
function TrashboxMarkers({ trashboxes, selectTrashbox }: TrashboxMarkersProps) {
|
||||
return (
|
||||
<>{trashboxes.map((trashbox, index) => (
|
||||
<Marker icon={iconTrash} key={`${trashbox.Lat}${trashbox.Lng}`} position={[trashbox.Lat, trashbox.Lng]}>
|
||||
|
Reference in New Issue
Block a user