cleanup
This commit is contained in:
@@ -7,7 +7,6 @@ const ChatboxWithSettings = ({ settingsEndpoint, matrixServerUrl, ...rest }) =>
|
||||
const [settings, setSettings] = useState({});
|
||||
const [shifts, setShifts] = useState();
|
||||
const [isAvailable, setAvailability] = useState(false);
|
||||
const settingsObj = {};
|
||||
|
||||
const getSettings = async () => {
|
||||
if (!settingsEndpoint) {
|
||||
@@ -24,6 +23,7 @@ const ChatboxWithSettings = ({ settingsEndpoint, matrixServerUrl, ...rest }) =>
|
||||
const res = await fetch(url);
|
||||
const data = await res.json();
|
||||
const { fields, schedule = [] } = data;
|
||||
const settingsObj = {};
|
||||
|
||||
setShifts(schedule);
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ const DEFAULT_WAIT_MESSAGE = "Please be patient, our online facilitators are cur
|
||||
const DEFAULT_ENCRYPTION_DISABLED = false
|
||||
const DEFAULT_POSITION = 'bottom right'
|
||||
const DEFAULT_SIZE = 'large'
|
||||
const DEFAULT_MAX_WAIT_MS = 600000 // 10 minutes
|
||||
const DEFAULT_WAIT_INTERVAL_MS = 120000 // 2 minutes
|
||||
const DEFAULT_DOCK_LABEL = 'Start a new chat'
|
||||
const DEFAULT_ENABLED = false
|
||||
@@ -785,7 +784,6 @@ ChatBox.propTypes = {
|
||||
isEncryptionDisabled: PropTypes.bool,
|
||||
position: PropTypes.oneOf(['top left', 'top right', 'bottom left', 'bottom right']),
|
||||
size: PropTypes.oneOf(['small', 'large']),
|
||||
maxWaitTime: PropTypes.number,
|
||||
waitInterval: PropTypes.number,
|
||||
dockLabel: PropTypes.string,
|
||||
enabled: PropTypes.bool
|
||||
@@ -807,7 +805,6 @@ ChatBox.defaultProps = {
|
||||
isEncryptionDisabled: DEFAULT_ENCRYPTION_DISABLED,
|
||||
position: DEFAULT_POSITION,
|
||||
size: DEFAULT_SIZE,
|
||||
maxWaitTime: DEFAULT_MAX_WAIT_MS,
|
||||
waitInterval: DEFAULT_WAIT_INTERVAL_MS,
|
||||
dockLabel: DEFAULT_DOCK_LABEL,
|
||||
enabled: DEFAULT_ENABLED,
|
||||
|
||||
Reference in New Issue
Block a user