PluginProbe
ElasticPress / 5.0.2
ElasticPress v5.0.2
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
elasticpress / assets / js / sync-ui / components / sync-history.js

sync-history.js in ElasticPress 5.0.2, at assets/js/sync-ui/components/sync-history.js

40 lines 739 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * WordPress dependencies.
3 */
4 import { WPElement } from '@wordpress/element';
5
6 /**
7 * Internal dependencies.
8 */
9 import { useSync } from '../../sync';
10 import PreviousSync from './previous-sync';
11
12 /**
13 * Delete checkbox component.
14 *
15 * @returns {WPElement} Sync page component.
16 */
17 export default () => {
18 const { syncHistory } = useSync();
19
20 const previousSyncs = syncHistory.slice(0, 5);
21
22 return (
23 <ol className="ep-sync-history">
24 {previousSyncs.map((s) => {
25 return (
26 <li key={s.start_date_time}>
27 <PreviousSync
28 failures={s.failed}
29 method={s.method}
30 stateDatetime={s.start_date_time}
31 status={s.final_status}
32 trigger={s.trigger}
33 />
34 </li>
35 );
36 })}
37 </ol>
38 );
39 };
40