refactor(react-tree-orgchart): remove console logs and unused variables

This commit is contained in:
Jake Stanger 2020-01-28 14:11:39 +00:00
parent 7cf7f69d22
commit b3a579c729
2 changed files with 4 additions and 9 deletions

View File

@ -1,5 +1,5 @@
import { WebPartContext } from "@microsoft/sp-webpart-base"; import {WebPartContext} from "@microsoft/sp-webpart-base";
import { sp } from "@pnp/sp"; import {sp} from "@pnp/sp";
export default class SPServices { export default class SPServices {
constructor(private context: WebPartContext) { constructor(private context: WebPartContext) {
@ -9,10 +9,7 @@ export default class SPServices {
} }
public async getUserProperties(user: string) { public async getUserProperties(user: string) {
let currentUserProperties: any = await sp.profiles.getPropertiesFor(user); return await sp.profiles.getPropertiesFor(user);
console.log(currentUserProperties);
return currentUserProperties;
} }
/** /**
@ -24,7 +21,6 @@ export default class SPServices {
user, user,
property property
); );
console.log(UserProperty);
return UserProperty; return UserProperty;
} }

View File

@ -86,7 +86,6 @@ export default class TreeOrgChart extends React.Component<
children: treeManagers.treeChildren children: treeManagers.treeChildren
}); });
} }
console.log(JSON.stringify(this.treeData));
this.setState({ treeData: this.treeData, isLoading: false }); this.setState({ treeData: this.treeData, isLoading: false });
} }
@ -306,7 +305,7 @@ export default class TreeOrgChart extends React.Component<
iconProps={{ iconName: "ContactInfo" }} iconProps={{ iconName: "ContactInfo" }}
title="Contact Info" title="Contact Info"
ariaLabel="Contact" ariaLabel="Contact"
onClick={ev => { onClick={() => {
window.open( window.open(
`https://eur.delve.office.com/?p=${rowInfo.node.title.props.tertiaryText}&v=work` `https://eur.delve.office.com/?p=${rowInfo.node.title.props.tertiaryText}&v=work`
); );