Skip to content

Commit

Permalink
Enable actions API
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Jan 15, 2025
1 parent 45a416e commit f5a5f67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import TextPlaceholder from 'calypso/jetpack-cloud/sections/partner-portal/text-
import { useFetchTestConnections } from '../../hooks/use-fetch-test-connection';
import useFormattedSites from '../../hooks/use-formatted-sites';
import SiteActions from '../../site-actions';
import { useSiteActionsDataViews } from '../../site-actions/use-site-actions';
import useGetSiteErrors from '../../sites-dataviews/hooks/use-get-site-errors';
import { AllowedTypes, Site, SiteData } from '../../types';
import type { Field } from '@wordpress/dataviews';
Expand Down Expand Up @@ -553,13 +554,15 @@ export const JetpackSitesDataViews = ( {
[ translate ]
);*/

const actions = useSiteActionsDataViews();

// Update the data packet
useEffect( () => {
setItemsData( ( prevState: ItemsDataViewsType< SiteData > ) => ( {
...prevState,
items: sites,
fields: fields,
//actions: actions,
actions,
pagination: {
totalItems: totalSites,
totalPages: totalPages,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,8 @@ export default function useSiteActions( {
translate,
] );
}

const EMPTY_ARRAY: any[] = [];
export function useSiteActionsDataViews() {
return EMPTY_ARRAY;
}

0 comments on commit f5a5f67

Please sign in to comment.