Skip to content

Commit d443fe4

Browse files
committed
maybe?
1 parent 9e1ae68 commit d443fe4

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

projects/packages/forms/src/dashboard/hooks/use-inbox-data.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* External dependencies
33
*/
44
import apiFetch from '@wordpress/api-fetch';
5-
import { useEntityRecords, store as coreDataStore } from '@wordpress/core-data';
5+
import { useEntityRecords } from '@wordpress/core-data';
66
import { useDispatch, useSelect } from '@wordpress/data';
77
import { useEffect, useState } from '@wordpress/element';
88
import { 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

0 commit comments

Comments
 (0)