1+ import { Dispatch , SetStateAction } from "react" ;
12import * as React from "react" ;
23import { useCallback } from "react" ;
34import type { ApplicationSettingsDTO } from "../../../api/types/dto" ;
@@ -56,7 +57,7 @@ export const ApplicationSettings = () => {
5657 ) ;
5758
5859 const handleDateChange = useCallback (
59- ( value : string , setter , key : string ) => {
60+ ( value : string , setter : Dispatch < SetStateAction < string > > , key : string ) => {
6061 setter ( value ) ;
6162 const date = new Date ( value ) ;
6263
@@ -111,11 +112,13 @@ export const ApplicationSettings = () => {
111112 < FlexRowColumnContainer >
112113 < TextInput
113114 value = { allowProfileFormFrom }
114- onChange = { ( value ) => handleDateChange (
115- value ,
116- setAllowProfileFormFrom ,
117- "allowProfileFormFrom"
118- ) }
115+ onChange = { ( value ) =>
116+ handleDateChange (
117+ value ,
118+ setAllowProfileFormFrom ,
119+ "allowProfileFormFrom" ,
120+ )
121+ }
119122 title = "Open registration on"
120123 placeholder = "1970-01-01 00:00:00"
121124 />
@@ -124,11 +127,13 @@ export const ApplicationSettings = () => {
124127 < FlexRowColumnContainer >
125128 < TextInput
126129 value = { allowProfileFormUntil }
127- onChange = { ( value ) => handleDateChange (
128- value ,
129- setAllowProfileFormUntil ,
130- "allowProfileFormUntil"
131- ) }
130+ onChange = { ( value ) =>
131+ handleDateChange (
132+ value ,
133+ setAllowProfileFormUntil ,
134+ "allowProfileFormUntil" ,
135+ )
136+ }
132137 title = "Close registration on"
133138 placeholder = "1970-01-01 00:00:00"
134139 />
@@ -138,11 +143,13 @@ export const ApplicationSettings = () => {
138143 < FlexRowColumnContainer >
139144 < TextInput
140145 value = { acceptanceDeadline }
141- onChange = { ( value ) => handleDateChange (
142- value ,
143- setAcceptanceDeadline ,
144- "acceptanceDeadline"
145- ) }
146+ onChange = { ( value ) =>
147+ handleDateChange (
148+ value ,
149+ setAcceptanceDeadline ,
150+ "acceptanceDeadline" ,
151+ )
152+ }
146153 title = "When we will accept people"
147154 placeholder = "1970-01-01 00:00:00"
148155 />
@@ -151,11 +158,9 @@ export const ApplicationSettings = () => {
151158 < FlexRowColumnContainer >
152159 < TextInput
153160 value = { confirmSpotUntil }
154- onChange = { ( value ) => handleDateChange (
155- value ,
156- setConfirmSpotUntil ,
157- "confirmSpotUntil"
158- ) }
161+ onChange = { ( value ) =>
162+ handleDateChange ( value , setConfirmSpotUntil , "confirmSpotUntil" )
163+ }
159164 title = "Until when accepted people need to confirm their spot"
160165 placeholder = "1970-01-01 00:00:00"
161166 />
0 commit comments