diff --git a/samples/react-follow-document/src/webparts/followDocumentWebPart/components/FollowDocumentWebPart.tsx b/samples/react-follow-document/src/webparts/followDocumentWebPart/components/FollowDocumentWebPart.tsx index 5dd572da3..09befcf06 100644 --- a/samples/react-follow-document/src/webparts/followDocumentWebPart/components/FollowDocumentWebPart.tsx +++ b/samples/react-follow-document/src/webparts/followDocumentWebPart/components/FollowDocumentWebPart.tsx @@ -131,9 +131,8 @@ export default class FollowDocumentWebPart extends React.Component 0 ? data.body.thumbnails[0].large.url : ""; @@ -284,49 +284,6 @@ export default class FollowDocumentWebPart extends React.Component => { - const graphService: Graph = new Graph(); - const initialized = await graphService.initialize(this.props.context.serviceScope); - let queryString: string = ""; - for (let index = 0; index < webs.length; index++) { - if (index === 0) { - queryString += "WebId:" + webs[index].replace('{', '').replace('}', ''); - } else { - queryString += " OR WebId:" + webs[index].replace('{', '').replace('}', '') + " "; - } - } - if (initialized) { - const HeaderWeb = { - "requests": [ - { - "entityTypes": [ - "site" - ], - "query": { - "queryString": "" + queryString + "", - } - } - ] - }; - //Retrieve webNames - const tmpWebs = await graphService.postGraphContent("https://graph.microsoft.com/beta/search/query", HeaderWeb); - graphData.forEach(element => { - tmpWebs.value[0].hitsContainers[0].hits.forEach(Webelement => { - if (element.fields.WebId.replace('{', '').replace('}', '') === Webelement.resource.id.split(/[, ]+/).pop().toUpperCase()) { - element.WebName = Webelement.resource.name; - element.WebUrl = Webelement.resource.webUrl; - } - } - ); - }); - return graphData; - } - } - private onActionTeamsClick = (action: FollowDocument, ev: React.SyntheticEvent): void => { const dialog: FollowDocumentDialog = new FollowDocumentDialog();