push notification fixed
This commit is contained in:
+1
-1
@@ -14,5 +14,5 @@ RUN apk add --no-cache bash
|
||||
|
||||
RUN apk add --no-cache yarn
|
||||
|
||||
CMD cd /home/app/nextjs && yarn cache dir && yarn cache clean && yarn build && pm2 startOrReload ecosystem.config.js --env production --no-daemon
|
||||
CMD cd /home/app/nextjs && yarn cache dir && yarn cache clean && yarn install && yarn build && pm2 startOrReload ecosystem.config.js --env production --no-daemon
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@ class WebPush extends Component {
|
||||
}
|
||||
|
||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||
console.log("isUserSubscribedToPush ::: " + nextProps.isUserSubscribedToPush);
|
||||
if (this.props.subscriveUserEnabled != nextProps.subscriveUserEnabled && nextProps.subscriveUserEnabled) {
|
||||
this.onSubscribeUser()
|
||||
}
|
||||
|
||||
if (!!nextProps.isUserSubscribedToPush) {
|
||||
this.setState({ on: true })
|
||||
}
|
||||
@@ -168,10 +168,8 @@ WebPush.propTypes = {
|
||||
}
|
||||
|
||||
function mapStateToProps(state) {
|
||||
|
||||
|
||||
return {
|
||||
isUserSubscribedToPush: state.isUserSubscribedToPush
|
||||
isUserSubscribedToPush: state.user.isUserSubscribedToPush
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<lastmod>2019-09-17</lastmod>
|
||||
</url>,<url>
|
||||
<loc>https://app.talentstube.com/Confidentialite</loc>
|
||||
<lastmod>2019-10-18</lastmod>
|
||||
<lastmod>2019-11-04</lastmod>
|
||||
</url>,<url>
|
||||
<loc>https://app.talentstube.com/Entreprises</loc>
|
||||
<lastmod>2019-09-17</lastmod>
|
||||
@@ -20,7 +20,7 @@
|
||||
<lastmod>2019-10-14</lastmod>
|
||||
</url>,<url>
|
||||
<loc>https://app.talentstube.com/MentionsLegales</loc>
|
||||
<lastmod>2019-10-18</lastmod>
|
||||
<lastmod>2019-11-04</lastmod>
|
||||
</url>,<url>
|
||||
<loc>https://app.talentstube.com/Offres</loc>
|
||||
<lastmod>2019-10-16</lastmod>
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
"dev": "cross-env PORT=3000 node server.js",
|
||||
"build": "next build && yarn postExport && yarn copysw && yarn copySiteMap",
|
||||
"start": "cross-env PORT=8000 NODE_ENV=production node server.js",
|
||||
"startPreprod": "cross-env PORT=8000 NODE_ENV=preproduction node server.js",
|
||||
"pm2-prod": "yarn build && pm2 start --name 'next' -- start",
|
||||
"bs": "yarn build && yarn start",
|
||||
"test": "yarn cypress run",
|
||||
|
||||
@@ -181,19 +181,20 @@ export function user(state = {
|
||||
return {
|
||||
...state,
|
||||
loading: false,
|
||||
pushSubscribed: true
|
||||
isUserSubscribedToPush: true
|
||||
}
|
||||
case SUBSCRIBE_USER_TO_PUSH_FAILURE:
|
||||
return {
|
||||
...state,
|
||||
loading: false,
|
||||
pushSubscribed: false,
|
||||
isUserSubscribedToPush: false,
|
||||
errors: action.err,
|
||||
}
|
||||
case FETCH_USER_SUBSCRIPTION_TO_PUSH_REQUEST:
|
||||
return {
|
||||
...state,
|
||||
loading: true,
|
||||
isUserSubscribedToPush: false,
|
||||
}
|
||||
case FETCH_USER_SUBSCRIPTION_TO_PUSH_SUCCESS:
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user