diff --git a/pages/profile.js b/pages/profile.js index d399b986..17440230 100644 --- a/pages/profile.js +++ b/pages/profile.js @@ -3,12 +3,10 @@ import Router from 'next/router' import join from 'url-join' import getConfig from 'next/config' import Button from '../components/button' -import Chance from 'chance' import Section from '../components/section' import SectionHeader from '../components/section-header' import Table from '../components/table' import { getTeams } from '../lib/teams-api' -const chance = Chance() const { publicRuntimeConfig } = getConfig() const URL = publicRuntimeConfig.APP_URL @@ -41,27 +39,6 @@ export default class Profile extends Component { } } - async createTeam () { - let res = await fetch(join(URL, '/api/teams'), { - method: 'POST', - body: JSON.stringify({ - name: `${chance.country({ full: true })} ${chance.animal()} ${chance.pickone([ - 'Group', 'Inc.', 'Ltd.', 'Team', 'Associates', 'Party', 'LLC', 'Corp.' - ] - )}`, - hashtag: chance.hashtag() - }), - headers: { - 'Content-Type': 'application/json; charset=utf-8' - } - }) - if (res.status === 200) { - await this.refreshTeams() - } else { - throw new Error('Could not create new team') - } - } - componentDidMount () { this.refreshTeams() } @@ -97,7 +74,7 @@ export default class Profile extends Component {