Skip to content

Commit

Permalink
Merge pull request #11 from newfold-labs/interval_change_trial
Browse files Browse the repository at this point in the history
Interval changes, Version Update 1.0.5
  • Loading branch information
ramyakrishnai authored Feb 9, 2024
2 parents cf43ec1 + 7c41546 commit 0ac78e5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function () {
define('MONTH_IN_SECONDS', '60 * 60 * 24 * 30');
}
if ( ! defined( 'NFD_FACEBOOK_VERSION' ) ) {
define( 'NFD_FACEBOOK_VERSION', '1.0.4' );
define( 'NFD_FACEBOOK_VERSION', '1.0.5' );
}
new Facebook($container);
},
Expand Down
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-i18n'), 'version' => 'eaa6051bcd3504c5558e');
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-i18n'), 'version' => '8ff8f172454392d65453');
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newfold-labs/wp-module-facebook",
"version": "1.0.4",
"version": "1.0.5",
"description": "## How it works?",
"main": "build/index.js",
"scripts": {
Expand Down
15 changes: 8 additions & 7 deletions src/components/facebookConnectButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ const FacebookConnectButton = ({
onConnect(response);
}
} else {
if (counter < 2) {
if (counter < 8) {
setTimeout(() => {
getProfileData();
getProfileData(counter);
setLoader(true);
}, 6000);
}, 2000);
} else {
setLoader(false);
}
Expand All @@ -82,10 +82,11 @@ const FacebookConnectButton = ({
apiFetch({ url: constants.wordpress.access }).then((res) => {
res.token && setFieldValue(res.token);
});
getProfileData(1);
getProfileData(7);
}, []);

const connectFacebook = () => {
setLoader(true);
const win = window.open(
`${constants.cf_worker.login_screen}?token_hiive=${fieldValue}&redirect=${window.location.href}`,
'ModalPopUp',
Expand All @@ -95,13 +96,13 @@ const FacebookConnectButton = ({

const intervalId = setInterval(() => {
if (win?.closed) {
setLoader(true);
// setLoader(true);
clearInterval(intervalId);
setTimeout(() => {
getProfileData(0);
}, 5000);
}, 2000);
}
}, 5000)
}, 2000)

if (typeof onClick === 'function') {
onClick();
Expand Down

0 comments on commit 0ac78e5

Please sign in to comment.