Skip to content

Commit

Permalink
calling comingSoonAdminbarToggle on update of comingsoon
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyakrishnai committed Jun 24, 2024
1 parent 65b7e31 commit 227a098
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/pages/home/welcomeSection.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { useContext } from '@wordpress/element';
import { useUpdateEffect } from 'react-use';
import { OnboardingScreen } from '@newfold-labs/wp-module-ecommerce';
import AppStore from 'App/data/store';
import { bluehostSettingsApiFetch } from 'App/util/helpers';
import { useNotification } from 'App/components/notifications';
import { comingSoonAdminbarToggle } from '../../util/helpers';

const WelcomeSection = ( {} ) => {
const { store, setStore } = useContext( AppStore );
Expand All @@ -16,6 +18,10 @@ const WelcomeSection = ( {} ) => {
() => setStore( { ...store, comingSoon: ! store.comingSoon } )
);

useUpdateEffect(() => {

Check failure on line 21 in src/app/pages/home/welcomeSection.js

View workflow job for this annotation

GitHub Actions / ESLint

Replace `↹useUpdateEffect(` with `useUpdateEffect(·`
comingSoonAdminbarToggle(store.comingSoon)

Check failure on line 22 in src/app/pages/home/welcomeSection.js

View workflow job for this annotation

GitHub Actions / ESLint

Replace `↹↹↹comingSoonAdminbarToggle(store.comingSoon)` with `↹↹comingSoonAdminbarToggle(·store.comingSoon·);`
}, [store.comingSoon])

Check failure on line 23 in src/app/pages/home/welcomeSection.js

View workflow job for this annotation

GitHub Actions / ESLint

Replace `↹},·[store.comingSoon])` with `},·[·store.comingSoon·]·);`

return (
<OnboardingScreen
comingSoon={ store.comingSoon }
Expand Down

0 comments on commit 227a098

Please sign in to comment.