@@ -5,9 +5,9 @@ import ComponentPanelItem from './ComponentPanelItem';
5
5
import ComponentPanelRoutingItem from './ComponentPanelRoutingItem' ;
6
6
import { makeStyles } from '@material-ui/core/styles' ;
7
7
// The component panel section of the left panel displays all components and has the ability to add new components
8
- const ComponentDrag = ( { isThemeLight} ) : JSX . Element => {
8
+ const ComponentDrag = ( { isThemeLight } ) : JSX . Element => {
9
9
const classes = useStyles ( ) ;
10
- const [ state , ] = useContext ( StateContext ) ;
10
+ const [ state , ] = useContext ( StateContext ) ;
11
11
const isFocus = ( targetId : Number ) => {
12
12
return state . canvasFocus . componentId === targetId ? true : false ;
13
13
} ;
@@ -18,26 +18,26 @@ const ComponentDrag = ({isThemeLight}): JSX.Element => {
18
18
{ /* Font size for 'index' in root components in .compPanelItem h3 style.css */ }
19
19
< div className = { classes . panelWrapperList } >
20
20
{ /* Heading just below ADD button */ }
21
- < h4 className = { isThemeLight ? classes . lightThemeFontColor : classes . darkThemeFontColor } > { state . projectType === 'Next.js' || state . projectType === 'Gatsby.js' ? 'Pages' : 'Root Components' } </ h4 >
21
+ < h4 className = { isThemeLight ? classes . lightThemeFontColor : classes . darkThemeFontColor } > { state . projectType === 'Next.js' || state . projectType === 'Gatsby.js' ? 'Pages' : 'Root Components' } </ h4 >
22
22
< Grid container direction = "row" justify = "center" alignItems = "center" >
23
23
{ state . components
24
24
. filter ( comp => state . rootComponents . includes ( comp . id ) )
25
25
. map ( comp => {
26
26
return (
27
- < ComponentPanelItem
27
+ < ComponentPanelItem
28
28
isFocus = { isFocus ( comp . id ) }
29
29
key = { `comp-${ comp . id } ` }
30
30
name = { comp . name }
31
31
id = { comp . id }
32
32
root = { true }
33
33
isThemeLight = { isThemeLight }
34
- />
35
-
34
+ />
35
+
36
36
) ;
37
37
} ) }
38
38
</ Grid >
39
39
{ /* Display all reusable components */ }
40
- < h4 className = { isThemeLight ? classes . lightThemeFontColor : classes . darkThemeFontColor } > Reusable Components</ h4 >
40
+ < h4 className = { isThemeLight ? classes . lightThemeFontColor : classes . darkThemeFontColor } > Reusable Components</ h4 >
41
41
< Grid container direction = "row" justify = "center" alignItems = "center" >
42
42
{ state . components
43
43
. filter ( comp => ! state . rootComponents . includes ( comp . id ) )
@@ -55,7 +55,7 @@ const ComponentDrag = ({isThemeLight}): JSX.Element => {
55
55
} ) }
56
56
</ Grid >
57
57
{ /* Display routing components - (only applies to next.js or gatsby.js which has routing built in) */ }
58
- { state . projectType === 'Next.js' || state . projectType === 'Gatsby.js' ? (
58
+ { /* { state.projectType === 'Next.js' || state.projectType === 'Gatsby.js'? (
59
59
<React.Fragment>
60
60
<h4>Routing</h4>
61
61
<Grid
@@ -69,7 +69,7 @@ const ComponentDrag = ({isThemeLight}): JSX.Element => {
69
69
</React.Fragment>
70
70
) : (
71
71
''
72
- ) }
72
+ )} */ }
73
73
</ div >
74
74
</ div >
75
75
) ;
@@ -78,9 +78,9 @@ const ComponentDrag = ({isThemeLight}): JSX.Element => {
78
78
const useStyles = makeStyles ( {
79
79
panelWrapper : {
80
80
display : 'flex' ,
81
- flexDirection :'column' ,
82
- alignItems :'center' ,
83
- flexGrow : 1 ,
81
+ flexDirection : 'column' ,
82
+ alignItems : 'center' ,
83
+ flexGrow : 1 ,
84
84
overflow : 'auto' ,
85
85
} ,
86
86
panelWrapperList : {
0 commit comments