Skip to content

Commit

Permalink
refactor: copy paste functional refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed Mar 12, 2024
1 parent 8048f9b commit 3ddb333
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 63 deletions.
57 changes: 0 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"@edx/frontend-lib-content-components": "^2.0.0",
"@edx/frontend-platform": "7.0.1",
"@edx/openedx-atlas": "^0.6.0",
"@openedx/paragon": "^21.5.7",
"@edx/react-unit-test-utils": "^1.7.0",
"@fortawesome/fontawesome-svg-core": "1.2.36",
"@fortawesome/free-brands-svg-icons": "5.15.4",
Expand All @@ -54,17 +53,17 @@
"@fortawesome/react-fontawesome": "0.2.0",
"@openedx-plugins/course-app-calculator": "file:plugins/course-apps/calculator",
"@openedx-plugins/course-app-edxnotes": "file:plugins/course-apps/edxnotes",
"@openedx-plugins/course-app-learning_assistant": "file:plugins/course-apps/learning_assistant",
"@openedx-plugins/course-app-live": "file:plugins/course-apps/live",
"@openedx-plugins/course-app-ora_settings": "file:plugins/course-apps/ora_settings",
"@openedx-plugins/course-app-proctoring": "file:plugins/course-apps/proctoring",
"@openedx-plugins/course-app-progress": "file:plugins/course-apps/progress",
"@openedx-plugins/course-app-teams": "file:plugins/course-apps/teams",
"@openedx-plugins/course-app-wiki": "file:plugins/course-apps/wiki",
"@openedx-plugins/course-app-learning_assistant": "file:plugins/course-apps/learning_assistant",
"@openedx-plugins/course-app-xpert_unit_summary": "file:plugins/course-apps/xpert_unit_summary",
"@openedx/paragon": "^21.5.7",
"@reduxjs/toolkit": "1.9.7",
"@tanstack/react-query": "4.36.1",
"broadcast-channel": "^7.0.0",
"classnames": "2.2.6",
"core-js": "3.8.1",
"email-validator": "2.0.4",
Expand Down Expand Up @@ -92,11 +91,11 @@
},
"devDependencies": {
"@edx/browserslist-config": "1.2.0",
"@openedx/frontend-build": "13.0.27",
"@edx/react-unit-test-utils": "^2.0.0",
"@edx/reactifex": "^1.0.3",
"@edx/stylelint-config-edx": "2.3.0",
"@edx/typescript-config": "^1.0.1",
"@openedx/frontend-build": "13.0.27",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/react": "12.1.5",
"@testing-library/react-hooks": "^8.0.1",
Expand Down
3 changes: 1 addition & 2 deletions src/generic/broadcast-channel/hooks.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
useCallback, useEffect, useMemo, useRef,
} from 'react';
import { BroadcastChannel } from 'broadcast-channel';

const channelInstances = {};

Expand All @@ -22,7 +21,7 @@ export const useBroadcastChannel = (channelName, onMessageReceived) => {
// Native BroadcastChannel passes event to onmessage callback and to
// access data we need to use `event.data`, but npm BroadcastChannel
// directly passes data as seen below
channel.onmessage = (data) => onMessageReceived(data);
channel.onmessage = (event) => onMessageReceived(event.data);
}
return () => {
if (isSubscribed.current || process.env.NODE_ENV !== 'development') {
Expand Down

0 comments on commit 3ddb333

Please sign in to comment.