Skip to content

Commit

Permalink
Merge pull request #129 from simeeid/hotfix/fix-amplify-pubsub
Browse files Browse the repository at this point in the history
Fix problem with subscribe when used in production mode
  • Loading branch information
javidaf committed Nov 22, 2023
2 parents 528edb6 + 660822c commit ce44061
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 21
node-version: 20.x
cache: "npm"
- name: Install packages
working-directory: norbit-webapp
Expand All @@ -39,7 +39,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x, 21.x]
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect } from "react";
import { Amplify } from "aws-amplify";
import { Amplify, PubSub } from "aws-amplify";
import { AWSIoTProvider } from "@aws-amplify/pubsub";
import { useDispatch, useSelector } from "react-redux";
import { setInitialized } from "redux/slices/amplifySlice";
Expand All @@ -20,7 +20,7 @@ const AmplifyInitializer: React.FC<AmplifyInitializerProps> = ({ children }) =>
if (!isMock) {
console.log("Running Amplify in live mode");
Amplify.configure(amplifyConfig);
Amplify.addPluggable(
PubSub.addPluggable(
new AWSIoTProvider({
aws_pubsub_region: process.env.NEXT_PUBLIC_REGION,
aws_pubsub_endpoint: `wss://${process.env.NEXT_PUBLIC_MQTT_ID}/mqtt`,
Expand Down

0 comments on commit ce44061

Please sign in to comment.