From 19d5c7e73017b948b5a9e5f8e1fee6a29d90c602 Mon Sep 17 00:00:00 2001 From: Alex Bratsos Date: Sat, 4 Jan 2020 00:56:23 +0200 Subject: [PATCH] fixup! Extract available shapes to one place --- src/index.tsx | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index bf51b1007..d9ad8c138 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -590,29 +590,6 @@ class App extends React.Component<{}, AppState> { } }; - private renderOption({ - type, - children - }: { - type: string; - children: React.ReactNode; - }) { - return ( - - ); - } - public render() { return (
{ >
Shapes - {SHAPES.map(shape => - this.renderOption({ type: shape.value, children: shape.label }) - )} + {SHAPES.map(({ value, label }) => ( + + ))}