2016-01-03 23:18:42 +02:00
import React , { Component } from 'react' ;
2016-01-18 07:28:43 +02:00
import { connect } from 'react-redux' ;
2016-01-03 23:18:42 +02:00
import AppInfo from 'components/auth/AppInfo' ;
2016-01-31 14:59:38 +02:00
import PanelTransition from 'components/auth/PanelTransition' ;
2016-01-03 23:18:42 +02:00
import styles from './auth.scss' ;
2016-01-18 07:28:43 +02:00
class AuthPage extends Component {
2016-02-06 12:47:51 +02:00
static displayName = 'AuthPage' ;
state = {
isSidebarHidden : false
} ;
2016-01-16 14:06:22 +02:00
2016-01-03 23:18:42 +02:00
render ( ) {
2016-02-06 12:47:51 +02:00
var { isSidebarHidden } = this . state ;
2016-01-03 23:18:42 +02:00
var appInfo = {
name : 'TLauncher' ,
2016-01-04 08:02:13 +02:00
description : ` Лучший альтернативный лаунчер для Minecraft с большим количеством версий и их модификаций, а также возмоностью входа как с лицензионным аккаунтом, так и без него. `
2016-01-03 23:18:42 +02:00
} ;
return (
< div >
2016-02-06 12:47:51 +02:00
< div className = { isSidebarHidden ? styles . hiddenSidebar : styles . sidebar } >
< AppInfo { ...appInfo } onGoToAuth = { this . onGoToAuth } / >
2016-01-03 23:18:42 +02:00
< / div >
< div className = { styles . content } >
2016-01-31 14:59:38 +02:00
< PanelTransition { ...this.props } / >
2016-01-03 23:18:42 +02:00
< / div >
< / div >
) ;
}
2016-02-06 12:47:51 +02:00
onGoToAuth = ( ) => {
this . setState ( {
isSidebarHidden : true
} ) ;
} ;
2016-01-21 08:29:35 +02:00
}
2016-01-18 07:28:43 +02:00
export default connect ( ( state ) => ( {
path : state . routing . location . pathname
} ) ) ( AuthPage ) ;