32 lines
689 B
JavaScript
32 lines
689 B
JavaScript
import React, { Component } from 'react'
|
|
import PropTypes from 'prop-types'
|
|
|
|
import { parse } from '../../utils/js-helpers'
|
|
|
|
import { MessageCard } from '@advancedalgos/web-components'
|
|
|
|
class AcceptTeamInvite extends Component {
|
|
render () {
|
|
const { location, auth } = this.props
|
|
const param = parse(location.search)
|
|
console.log(param, auth)
|
|
|
|
if (auth === undefined) {
|
|
return <MessageCard message='Loading...' />
|
|
}
|
|
|
|
auth.loginInvite(param.token)
|
|
|
|
return (
|
|
<MessageCard message='Verifying Invitation' />
|
|
)
|
|
}
|
|
}
|
|
|
|
AcceptTeamInvite.propTypes = {
|
|
location: PropTypes.object.isRequired,
|
|
auth: PropTypes.object
|
|
}
|
|
|
|
export default AcceptTeamInvite
|