@newtonschool/react_proctoring_library 0.0.91 → 0.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,19 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = useKioskMode;
7
7
  require("core-js/modules/web.dom-collections.iterator.js");
8
8
  var _react = require("react");
9
- var _breachUtils = require("../../utils/breachUtils");
10
9
  var _ElectronContext = require("../../contexts/ElectronContext");
11
- function useKioskMode(_ref) {
12
- let {
13
- proctoredContext,
14
- proctorParams
15
- } = _ref;
16
- const {
17
- permissions
18
- } = (0, _react.useContext)(proctoredContext);
10
+ function useKioskMode() {
19
11
  const [connectedToInternet, setConnectedToInternet] = (0, _react.useState)(true);
20
12
  const isElectronApp = (0, _react.useContext)(_ElectronContext.ElectronContext);
21
- const shouldShowProctoredComponent = (0, _breachUtils.showProctoredComponent)(proctorParams, permissions);
22
13
  (0, _react.useEffect)(() => {
23
14
  const updateOnlineStatus = () => {
24
15
  setConnectedToInternet(window.navigator.onLine);
@@ -32,11 +23,11 @@ function useKioskMode(_ref) {
32
23
  };
33
24
  }, []);
34
25
  (0, _react.useEffect)(() => {
35
- if (shouldShowProctoredComponent && isElectronApp && connectedToInternet) {
26
+ if (isElectronApp && connectedToInternet) {
36
27
  window.electron.actions.enableKioskMode();
37
28
  } else {
38
29
  var _window$electron, _window$electron$acti;
39
30
  (_window$electron = window.electron) === null || _window$electron === void 0 ? void 0 : (_window$electron$acti = _window$electron.actions) === null || _window$electron$acti === void 0 ? void 0 : _window$electron$acti.disableKioskMode();
40
31
  }
41
- }, [shouldShowProctoredComponent, isElectronApp, connectedToInternet]);
32
+ }, [isElectronApp, connectedToInternet]);
42
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newtonschool/react_proctoring_library",
3
- "version": "0.0.91",
3
+ "version": "0.0.92",
4
4
  "description": "Used to proctor online tests",
5
5
  "author": "ayushkagrawal,shreyachandra,weastel",
6
6
  "main": "dist/index.js",