Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*
* It hardcodes data which is passed to dummy components,
* thus we disable max-len eslint rule for this file
*/
/* eslint-disable max-len */
import React from 'react';
import Section from 'components/tc-communities/Section';
import PT from 'prop-types';
import LoadingIndicator from 'components/LoadingIndicator';
import { services } from 'topcoder-react-lib';
import style from './style.scss';
const { getApi } = services.api;
const INFO_ID = '30058834';
/**
* NOTE: There is some reason to turn this component into container. This is
* a temporary hacky solution of one particular problem, do not take it as an
* example, and just ignore the fact that it is located under components
* section of the app code. It is a temporary exception.
*/
export default class Home extends React.Component {
constructor(props) {
super(props);
this.state = {
msgHtml: '',
};
}
/**
* This module provides a service for convenient manipulation with Topcoder
* membership via TC API.
*/
import { services } from 'topcoder-react-lib';
const { getApi } = services.api;
class MemberCertService {
/**
* @param {String} tokenV3 Optional. Auth token for Topcoder API v3.
*/
constructor(tokenV3) {
this.private = {
api: getApi('V3', tokenV3),
tokenV3,
};
}
/**
* check user has registered a program or not
* @param {string} userId user's id
* @param {string} programId program's id
async function getApi() {
const token = await getM2MToken();
return services.api.getApi('V5', token);
}