import React from 'react'
import classnames from 'classnames'
import { Link } from 'react-router'
import classes from './Users.scss'
import { userPoolId } from 'utils/settings'

export default class Users extends React.Component {
  render () {
    const region = userPoolId.match(/^[a-z0-9-]+/)
    if (!region) {
      console.warn('user pool id has unexpected format:', region)
    }
    const linkToUsersPage = `https://${region}.console.aws.amazon.com/cognito/users?region=${region}#/pool/${userPoolId}/users`
    return (<div className={classnames(classes.layout, 'mdl-grid')}>
      <div className='mdl-cell mdl-cell--12-col'>
        <h4>Users</h4>
      </div>
      <div className='mdl-cell mdl-cell--12-col'>
        Operations like creating a user are not supported here. Access
        <Link to={linkToUsersPage} className={classes.link}>
          Users page at Amazon Cognito
        </Link>
        for these operations.
      </div>
    </div>)
  }
}

@@ -59,44 +59,8 @@
 es'%0A
-import %7B Link %7D from 'react-router'%0A
 impo
@@ -761,15 +761,14 @@
    %3C
-Link to
+a href
 =%7Bli
@@ -861,12 +861,9 @@
   %3C/
-Link
+a
 %3E%0A  

Fix the invalid use of Link component