Skip to content

Commit d688a22

Browse files
committed
lint stuff
1 parent 0a6851a commit d688a22

4 files changed

Lines changed: 33 additions & 31 deletions

File tree

backend/src/services/rating-service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,7 @@ export class RatingService implements IRatingService {
237237

238238
const settings = await this._settings.getSettings();
239239
if (!settings.project.allowRatingProjects) {
240-
throw new ForbiddenError(
241-
"Rating is not allowed due to settings",
242-
);
240+
throw new ForbiddenError("Rating is not allowed due to settings");
243241
}
244242

245243
const project = await this._projects.findOneBy({ id: rating.project.id });

frontend/src/components/pages/status.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ export const Status = () => {
3939
const acceptanceDeadline = dateToString(
4040
settings.application.acceptanceDeadline,
4141
);
42-
const confirmSpotUntil = dateToString(
43-
settings.application.confirmSpotUntil,
44-
);
45-
46-
console.log(settings.application);
42+
const confirmSpotUntil = dateToString(settings.application.confirmSpotUntil);
4743

4844
const isExpired = user == null ? false : isConfirmationExpired(user);
4945
const isNotAttending = isExpired || user?.declined;
@@ -114,7 +110,10 @@ export const Status = () => {
114110
<InternalLink to={Routes.ProfileForm}>
115111
profile form
116112
</InternalLink>
117-
, any time between <b>{allowProfileFormFrom} - {allowProfileFormUntil}</b>
113+
, any time between{" "}
114+
<b>
115+
{allowProfileFormFrom} - {allowProfileFormUntil}
116+
</b>
118117
</Text>
119118
</>
120119
)}

frontend/src/components/settings/application/application-settings.tsx

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Dispatch, SetStateAction } from "react";
12
import * as React from "react";
23
import { useCallback } from "react";
34
import 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
/>

frontend/src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const sleep = (ms: number) =>
1818
*/
1919
export const dateToString = (date: Date | null) => {
2020
if (date == null) {
21-
return "?"
21+
return "?";
2222
}
2323

2424
return date.toLocaleString("default", {

0 commit comments

Comments
 (0)