mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
💄 Fix the webhook table UI
This commit is contained in:
parent
9101c1830b
commit
03119cb7d4
1 changed files with 10 additions and 6 deletions
|
@ -3,6 +3,11 @@ import { CommonHooks } from '../../../../../../data';
|
|||
|
||||
const HooksTableBlock = () => {
|
||||
const { webhooks } = CommonHooks.useWebhooks();
|
||||
const { url, events } = webhooks;
|
||||
|
||||
if ( ! url || ! events?.length ) {
|
||||
return <div>...</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<table className="ppcp-r-table">
|
||||
|
@ -21,13 +26,12 @@ const HooksTableBlock = () => {
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td className="ppcp-r-table__hooks-url">
|
||||
{ webhooks?.url }
|
||||
<td className="ppcp-r-table__hooks-url">{ url }</td>
|
||||
<td className="ppcp-r-table__hooks-events">
|
||||
{ events.map( ( event, index ) => (
|
||||
<div key={ index }>{ event }</div>
|
||||
) ) }
|
||||
</td>
|
||||
<td
|
||||
className="ppcp-r-table__hooks-events"
|
||||
dangerouslySetInnerHTML={ { __html: webhooks?.events } }
|
||||
></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue