Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 032f210

Browse files
fix: additional fixes
1 parent 317edaf commit 032f210

File tree

6 files changed

+37
-21
lines changed

6 files changed

+37
-21
lines changed

src/components/BaseModal/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const modalStyle = {
2222
maxWidth: "640px",
2323
width: "100%",
2424
margin: 0,
25-
"overflow-x": "hidden",
25+
overflowX: "hidden",
2626
};
2727

2828
const containerStyle = {

src/components/TimezoneSelector/index.jsx

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,32 @@
1-
import React from "react";
1+
import React, { useEffect, useState } from "react";
22
import PT from "prop-types";
33
import { TIME_ZONES } from "constants";
44
import moment from "moment";
55
import "./styles.module.scss";
66

77
const TimezoneSelector = ({ value, onChange }) => {
8+
const browserTimezone = moment.tz.guess(true);
9+
const [timezoneList, setTimezoneList] = useState([]);
10+
11+
useEffect(() => {
12+
const isBrowserTimezoneAvailable = TIME_ZONES.findIndex(item => item === browserTimezone);
13+
14+
if (isBrowserTimezoneAvailable === -1) {
15+
const finalList = [...TIME_ZONES, browserTimezone].sort();
16+
setTimezoneList(finalList);
17+
onChange(browserTimezone);
18+
} else {
19+
setTimezoneList(TIME_ZONES);
20+
}
21+
}, [browserTimezone]);
22+
823
return (
924
<div styleName="timezone-selector">
1025
<div styleName="label">Interview Timezone</div>
1126
<select styleName="select" onChange={onChange}>
12-
{TIME_ZONES.map((zone) => (
27+
{timezoneList.map((zone, index) => (
1328
<option
29+
key={index}
1430
value={zone}
1531
selected={zone === value}
1632
>{`${zone} - UTC${moment().tz(zone).format("Z")}`}</option>

src/routes/CreateNewTeam/components/BaseCreateModal/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const modalStyle = {
1111
padding: "72px 0 60px 0",
1212
width: "100%",
1313
margin: 0,
14-
"overflow-x": "hidden",
14+
overflowX: "hidden",
1515
};
1616

1717
const containerStyle = {

src/routes/PositionDetails/components/InterviewPopup/ManageAvailability/index.jsx

+12-13
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,11 @@ const ManageAvailability = ({ scheduleDetails, onContinue }) => {
182182
];
183183

184184
return (
185-
<div styleName="slot">
185+
<div styleName="slot" key={slotIndex}>
186186
<div styleName="days">
187187
{days.map((day, index) => (
188188
<div
189+
key={index}
189190
onClick={() => onDayChanged(daysMapped[index], slotIndex)}
190191
styleName={cn("day", {
191192
"selected-day": slot.days.indexOf(daysMapped[index]) > -1,
@@ -264,18 +265,16 @@ const ManageAvailability = ({ scheduleDetails, onContinue }) => {
264265
};
265266

266267
ManageAvailability.propTypes = {
267-
scheduleDetails: PT.arrayOf(
268-
PT.shape({
269-
timezone: PT.string,
270-
slots: PT.arrayOf(
271-
PT.shape({
272-
days: PT.array,
273-
end: PT.string,
274-
start: PT.string,
275-
})
276-
),
277-
})
278-
),
268+
scheduleDetails: PT.shape({
269+
timezone: PT.string,
270+
slots: PT.arrayOf(
271+
PT.shape({
272+
days: PT.array,
273+
end: PT.string,
274+
start: PT.string,
275+
})
276+
),
277+
}),
279278
onContinue: PT.func,
280279
};
281280

src/routes/PositionDetails/components/InterviewPopup/index.jsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react";
22
import { useSelector } from "react-redux";
33
import cn from "classnames";
44
import PT from "prop-types";
5+
import moment from "moment";
56
import Spinner from "components/CenteredSpinner";
67
import { toastr } from "react-redux-toastr";
78

@@ -273,7 +274,7 @@ const InterviewPopup = ({
273274
"show-spinner": isLoading,
274275
})}
275276
>
276-
<Spinner stype="Oval" width="80" height="80" />
277+
<Spinner stype="Oval" width={80} height={80} />
277278
</div>
278279
<div
279280
styleName={cn("component-wrapper", {
@@ -289,7 +290,7 @@ const InterviewPopup = ({
289290
};
290291

291292
InterviewPopup.propTypes = {
292-
candidate: PT.object.isRequired,
293+
candidate: PT.object,
293294
open: PT.bool,
294295
initialStage: PT.string,
295296
onClose: PT.func.isRequired,

src/routes/PositionDetails/components/StepsIndicator/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const StepsIndicator = ({ steps, currentStep }) => {
3535
const isCompleted = index <= currentStepIndex;
3636

3737
return (
38-
<>
38+
<div key={index}>
3939
<div styleName="outer-dot" style={styles} />
4040
<div
4141
styleName={cn("dot", { "dot-completed": isCompleted })}
@@ -47,7 +47,7 @@ const StepsIndicator = ({ steps, currentStep }) => {
4747
>
4848
{step.label}
4949
</div>
50-
</>
50+
</div>
5151
);
5252
})}
5353
</div>

0 commit comments

Comments
 (0)