sharepoint online – permissionKind returns empty in React

I have a search function that returns all the elements of the list, including its main link, depending on its content type, for all tenants.

Each item in the list comes from a specific subsite and I want to split the output for the following:

A type of elements in which the current user is a member of the main site of that element. The idea is that these elements are shown as "my articles".

And the oppsoite total from above: items in which the current user is not a member of your parent site. The idea here is to show them as "other elements" where the user can click on these elements, access the main subsite and manually request access to that site (they do not have read permission by default).

So I try to make a function that verifies the main link of each element of the list and see if the current user is a member of that particular site to which the link points, and if so, shows the elements.

    public getPermissions () {

const {listItems} = this.state;

{listItems.length> 0 && listItems.map ((item: Project) => {

let web = new Web (item.ListUrl);

web.getCurrentUserEffectivePermissions (). then (perms => {

if (web.hasPermissions (perms, PermissionKind.ViewPages)) {

return {__html: item.Title}

}})}
)}} 

I try to call him:

render public () {

he came back (

   
) } }

But I get an error on the way back:

"The property types & # 39; dangerouslySetInnerHTML & # 39; are incompatible.
The type & # 39; void & # 39; can not be assigned to the type & # 39; {__ html: string; } & # 39;
(method) GetSpListItems.getPermissions (): void "

Why does the function become empty?