From 241ff9412ff59fb99ee53ff8611d7acd8a3a2f6e Mon Sep 17 00:00:00 2001 From: RepIica Date: Tue, 3 Dec 2019 23:50:49 -0500 Subject: [PATCH] functional component conversion --- src/components/SidebarItems.js | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/components/SidebarItems.js b/src/components/SidebarItems.js index 8494b5e..d62b80d 100644 --- a/src/components/SidebarItems.js +++ b/src/components/SidebarItems.js @@ -1,17 +1,13 @@ -import React, { Component } from "react"; +import React from "react"; import { Menu } from "semantic-ui-react"; -class SidebarItems extends Component { - render() { - return ( - <> - { - console.log('a') - this.props.addPlanet(); - }}> - Add Planet - - {/* {this.props.addPrimitive('box')}}>cube +const SidebarItems = addPlanet => { + return ( + <> + + Add Planet + + {/* {this.props.addPrimitive('box')}}>cube {this.props.addPrimitive('torus-knot')}}>torus knot {this.props.addPrimitive('plane')}}>plane {this.props.addPrimitive('light')}}>kill lights @@ -19,9 +15,8 @@ class SidebarItems extends Component { Add Text v2 Select Color clear */} - - ); - } -} + + ); +}; export default SidebarItems;