Skip to content

Commit 21a7478

Browse files
committed
hotfix
1 parent ac74eac commit 21a7478

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

FU.SPA/src/components/pages/CreatePost.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export default function CreatePost() {
4646
} else {
4747
setIsEnabled(false);
4848
}
49-
console.log(isEnabled);
5049
}, [title, game, isEnabled]);
5150

5251
// Handles title state error
@@ -87,8 +86,8 @@ export default function CreatePost() {
8786

8887
// Handles end date state error
8988
const handleEndDateChange = (e) => {
90-
if (e.isAfter(dayjs().add(31, 'days'))) {
91-
setEndDateError('Time cannot exceed 1 month');
89+
if (e.isAfter(dayjs().add(24, 'hours'))) {
90+
setEndDateError('Time cannot exceed 24 hours');
9291
setEndTime(e);
9392
} else if (e.isBefore(startTime)) {
9493
setEndDateError('Time cannot be before start time');
@@ -234,7 +233,7 @@ export default function CreatePost() {
234233
textField: {
235234
fullWidth: true,
236235
error:
237-
endTime.isAfter(dayjs().add(31, 'days')) ||
236+
endTime.isAfter(dayjs().add(24, 'hours')) ||
238237
endTime.isBefore(startTime),
239238
helperText: endDateError,
240239
},
@@ -285,7 +284,7 @@ const GameSelector = ({ onChange }) => {
285284
GameService.searchGames('').then((games) => setGameOptions(games));
286285
GameService.searchGames('').then((games) => setGameOptions(games));
287286
} catch (err) {
288-
console.log(err);
287+
console.error(err);
289288
}
290289
};
291290
fetchGameOptions();

0 commit comments

Comments
 (0)