Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
this.updateTheme(this.getQueryVariable('theme'));
this.setState({
fontSize: this.pageFontSize(),
});
if (this.inTeams()) {
microsoftTeams.initialize();
microsoftTeams.registerOnThemeChangeHandler(this.updateTheme);
}
}
public componentWillMount() {
this.updateTheme(this.getQueryVariable("theme"));
this.setState({
fontSize: this.pageFontSize()
});
if (this.inTeams()) {
microsoftTeams.initialize();
microsoftTeams.registerOnThemeChangeHandler(this.updateTheme);
microsoftTeams.getContext((context) => {
this.configuration = context.entityId;
this.groupId = context.groupId;
});
} else {
this.setState({
graphData: "This is not hosted in Microsoft Teams"
});
}
}
public componentWillMount() {
this.updateTheme(this.getQueryVariable("theme"));
this.setState({
fontSize: this.pageFontSize()
});
if (this.inTeams()) {
microsoftTeams.initialize();
microsoftTeams.registerOnThemeChangeHandler(this.updateTheme);
microsoftTeams.getContext((context) => {
this.setState({
entityId: context.entityId
});
});
} else {
this.setState({
entityId: "This is not hosted in Microsoft Teams"
});
}
}