@@ -12,31 +12,24 @@ import React from 'react';
12
12
import styles from 'components/Sidebar/Sidebar.scss' ;
13
13
import { unselectable } from 'stylesheets/base.scss' ;
14
14
15
- export default class AppsMenu extends React . Component {
16
- render ( ) {
17
- const { apps, current, height, onSelect } = this . props ;
18
- return (
19
- < div style = { { height } } className = { [ styles . appsMenu , unselectable ] . join ( ' ' ) } >
20
- < div className = { styles . currentApp } onClick = { onSelect . bind ( null , current . slug ) } >
21
- { current . name }
22
- </ div >
23
- < div className = { styles . menuSection } > All Apps</ div >
24
- { apps . map ( ( app ) => {
25
- if ( app . slug === current . slug ) {
26
- return null ;
27
- }
28
- return (
29
- < Link to = { { pathname : html `/apps/${ app . slug } /browser` } } key = { app . slug } className = { styles . menuRow } >
30
- { app . name }
31
- < AppBadge production = { app . production } />
32
- </ Link >
33
- ) ;
34
- } ) }
35
- </ div >
36
- ) ;
37
- }
38
- }
15
+ let AppsMenu = ( { apps, current, height, onSelect } ) => (
16
+ < div style = { { height } } className = { [ styles . appsMenu , unselectable ] . join ( ' ' ) } >
17
+ < div className = { styles . currentApp } onClick = { onSelect . bind ( null , current . slug ) } >
18
+ { current . name }
19
+ </ div >
20
+ < div className = { styles . menuSection } > All Apps</ div >
21
+ { apps . map ( ( app ) => {
22
+ if ( app . slug === current . slug ) {
23
+ return null ;
24
+ }
25
+ return (
26
+ < Link to = { html `/apps/${ app . slug } /browser` } key = { app . slug } className = { styles . menuRow } >
27
+ { app . name }
28
+ < AppBadge production = { app . production } />
29
+ </ Link >
30
+ ) ;
31
+ } ) }
32
+ </ div >
33
+ ) ;
39
34
40
- AppsMenu . contextTypes = {
41
- router : React . PropTypes . object
42
- } ;
35
+ export default AppsMenu ;
0 commit comments