Skip to content

Commit 87d66fb

Browse files
author
Ives van Hoorne
committed
Disable React icon in sidebar for now to gain performance
1 parent 763bb46 commit 87d66fb

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

packages/app/src/app/components/CodeEditor/Configuration/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default class Configuration extends React.PureComponent<Props>
6464
<EntryIcons
6565
width={32}
6666
height={32}
67-
type={getType(currentModule.title, currentModule.code || '')}
67+
type={getType(currentModule.title)}
6868
/>
6969
<Title>{config.title}</Title>
7070

packages/app/src/app/components/CodeEditor/FilePath/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class FilePath extends React.Component {
4949
<FileName hovering={!workspaceHidden || this.state.hovering}>
5050
<EntryIcons
5151
isNotSynced={currentModule.isNotSynced}
52-
type={getType(currentModule.title, currentModule.code)}
52+
type={getType(currentModule.title)}
5353
error={currentModule.errors && currentModule.errors.length > 0}
5454
/>
5555
<span style={{ marginLeft: '0.25rem' }}>{fileName}</span>

packages/app/src/app/components/CodeEditor/FuzzySearch/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default class FuzzySearch extends React.PureComponent {
109109
{item.m.isNotSynced && <NotSyncedIconWithMargin />}
110110
<EntryIcons
111111
isNotSynced={item.m.isNotSynced}
112-
type={getType(item.m.title, item.m.code)}
112+
type={getType(item.m.title)}
113113
error={item.m.errors && item.m.errors.length > 0}
114114
/>
115115
<Name>{item.m.title}</Name>

packages/app/src/app/pages/Sandbox/Editor/Content/Tabs/Tab/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Tab extends React.Component {
7171
>
7272
<EntryIcons
7373
isNotSynced={isNotSynced}
74-
type={getType(module.title, module.code)}
74+
type={getType(module.title)}
7575
error={hasError}
7676
/>
7777
<TabTitle>{module.title}</TabTitle>

packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/DirectoryChildren/ModuleEntry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ModuleEntry extends React.Component {
2525

2626
const isActive = module.shortid === currentModuleShortid;
2727
const isMainModule = module.id === mainModuleId;
28-
const type = getType(module.title, module.code);
28+
const type = getType(module.title);
2929

3030
const hasError = store.editor.errors.filter(
3131
error => error.moduleId === module.id

packages/app/src/app/pages/Sandbox/Editor/Workspace/OpenedTabs/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const OpenedTabs = ({ store, signals }) => {
5050
>
5151
<EntryIcons
5252
isNotSynced={m.isNotSynced}
53-
type={getType(m.title, m.code)}
53+
type={getType(m.title)}
5454
error={m.errors && m.errors.length > 0}
5555
/>
5656
<Title>{m.title}</Title>

packages/app/src/app/utils/get-type.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ function isJS(title: string) {
6363
return undefined;
6464
}
6565

66-
export default function getType(title: string, code: string) {
66+
export default function getType(title: string) {
6767
const isJSType = isJS(title);
6868
if (isJSType) {
69-
if (hasReact(code || '')) return 'react';
69+
// if (hasReact(code || '')) return 'react';
7070
return isJSType;
7171
}
7272

packages/app/src/embed/components/Files/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function Files({
7171
shortid={m.shortid}
7272
title={m.title}
7373
key={m.shortid}
74-
type={getType(m.title, m.code || '')}
74+
type={getType(m.title)}
7575
depth={depth}
7676
setCurrentModule={setCurrentModule}
7777
active={m.id === currentModule}

0 commit comments

Comments
 (0)