File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
projects/packages/forms/src/dashboard/hooks Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 22 * External dependencies
33 */
44import apiFetch from '@wordpress/api-fetch' ;
5- import { useEntityRecords , store as coreDataStore } from '@wordpress/core-data' ;
5+ import { useEntityRecords } from '@wordpress/core-data' ;
66import { useDispatch , useSelect } from '@wordpress/data' ;
77import { useEffect , useState } from '@wordpress/element' ;
88import { addQueryArgs } from '@wordpress/url' ;
@@ -92,20 +92,7 @@ export default function useInboxData(): UseInboxDataReturn {
9292 ...currentQuery ,
9393 } ) ;
9494
95- const records = useSelect (
96- select => {
97- return ( rawRecords || [ ] ) . map ( record => {
98- // Get the edited version of this record if it exists
99- const editedRecord = select ( coreDataStore ) . getEditedEntityRecord (
100- 'postType' ,
101- 'feedback' ,
102- ( record as FormResponse ) . id
103- ) ;
104- return editedRecord || record ;
105- } ) as FormResponse [ ] ;
106- } ,
107- [ rawRecords ]
108- ) ;
95+ const records = ( rawRecords || [ ] ) as FormResponse [ ] ;
10996
11097 const [ isLoadingCounts , setIsLoadingCounts ] = useState ( false ) ;
11198
You can’t perform that action at this time.
0 commit comments