aboutsummaryrefslogtreecommitdiff
path: root/src/console/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/console/components')
-rw-r--r--src/console/components/Console.tsx4
-rw-r--r--src/console/components/console/Completion.tsx10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/console/components/Console.tsx b/src/console/components/Console.tsx
index 1743d15..eafe2a7 100644
--- a/src/console/components/Console.tsx
+++ b/src/console/components/Console.tsx
@@ -34,7 +34,7 @@ class Console extends React.Component<Props> {
e.stopPropagation();
e.preventDefault();
- let value = (e.target as HTMLInputElement).value;
+ const value = (e.target as HTMLInputElement).value;
if (this.props.mode === 'command') {
return this.props.dispatch(consoleActions.enterCommand(value));
} else if (this.props.mode === 'find') {
@@ -101,7 +101,7 @@ class Console extends React.Component<Props> {
}
onChange(e: React.ChangeEvent<HTMLInputElement>) {
- let text = e.target.value;
+ const text = e.target.value;
this.props.dispatch(consoleActions.setConsoleText(text));
if (this.props.mode === 'command') {
this.props.dispatch(consoleActions.getCompletions(text));
diff --git a/src/console/components/console/Completion.tsx b/src/console/components/console/Completion.tsx
index 169a39c..e2fa1de 100644
--- a/src/console/components/console/Completion.tsx
+++ b/src/console/components/console/Completion.tsx
@@ -35,11 +35,11 @@ class Completion extends React.Component<Props, State> {
return null;
}
- let viewSelect = (() => {
+ const viewSelect = (() => {
let index = 0;
for (let i = 0; i < nextProps.completions.length; ++i) {
++index;
- let g = nextProps.completions[i];
+ const g = nextProps.completions[i];
if (nextProps.select + i + 1 < index + g.items.length) {
return nextProps.select + i + 1;
}
@@ -64,12 +64,12 @@ class Completion extends React.Component<Props, State> {
let eles = [];
let index = 0;
- for (let group of this.props.completions) {
+ for (const group of this.props.completions) {
eles.push(<CompletionTitle
key={`group-${index}`}
title={ group.name }
/>);
- for (let item of group.items) {
+ for (const item of group.items) {
eles.push(<CompletionItem
key={`item-${index}`}
icon={item.icon}
@@ -81,7 +81,7 @@ class Completion extends React.Component<Props, State> {
}
}
- let viewOffset = this.state.viewOffset;
+ const viewOffset = this.state.viewOffset;
eles = eles.slice(viewOffset, viewOffset + this.props.size);
return (