Skip to content

Commit 8202f0d

Browse files
authored
Deleting unnecessary "GenerateNewCode()" function
1 parent a158f43 commit 8202f0d

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/components/LeftColExpansionPanel.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,7 @@ const LeftColExpansionPanel = (props: LeftColExpPanPropsInt) => {
6868
// state/class toggles will be displayed when a component is focused
6969
const focusedToggle = isFocused() === 'focused' ? true : false;
7070

71-
//helper function to update the code in the code preview when state/class toggles are switched
72-
const generateNewCode = () => {
73-
const text = format(componentRender(focusComponent, components), {
74-
singleQuote: true,
75-
trailingComma: 'es5',
76-
bracketSpacing: true,
77-
jsxBracketSameLine: true,
78-
parser: 'typescript'
79-
});
80-
updateCode({
81-
componentId: focusComponent.id,
82-
code: text
83-
});
84-
};
71+
8572

8673
//this function determines whether edit mode for component name should be entered or not
8774
//resets the title if 'escape' key is hit

0 commit comments

Comments
 (0)