Small code fixes

This commit is contained in:
inpsyde-maticluznar 2024-12-20 12:38:42 +01:00
parent 768748281b
commit f0a09ba83b
No known key found for this signature in database
GPG key ID: D005973F231309F6
3 changed files with 6 additions and 6 deletions

View file

@ -1,6 +1,9 @@
import { __ } from '@wordpress/i18n';
import { CommonHooks } from '../../../../../../data';
const HooksTableBlock = () => {
const { webhooks } = CommonHooks.useWebhooks();
const HooksTableBlock = ( { webhooks } ) => {
return (
<table className="ppcp-r-table">
<thead>

View file

@ -7,15 +7,12 @@ import {
ToggleSettingsBlock,
} from '../../../../../ReusableComponents/SettingsBlocks';
import SettingsBlock from '../../../../../ReusableComponents/SettingsBlocks/SettingsBlock';
import { CommonHooks } from '../../../../../../data';
import SimulationBlock from './SimulationBlock';
import ResubscribeBlock from './ResubscribeBlock';
import HooksTableBlock from './HooksTableBlock';
const Troubleshooting = ( { updateFormValue, settings } ) => {
const { webhooks } = CommonHooks.useWebhooks();
return (
<AccordionSettingsBlock
className="ppcp-r-settings-block--troubleshooting"
@ -64,7 +61,7 @@ const Troubleshooting = ( { updateFormValue, settings } ) => {
.
</Description>
</Header>
<HooksTableBlock webhooks={ webhooks } />
<HooksTableBlock />
<ResubscribeBlock />
<SimulationBlock />
</SettingsBlock>

View file

@ -35,7 +35,7 @@ const defaultPersistent = Object.freeze( {
useManualConnection: false,
clientId: '',
clientSecret: '',
webhooks: 0,
webhooks: [],
} );
// Reducer logic.