Skip to content

Commit 92847fe

Browse files
author
Stefania
committed
better indentation
1 parent 06046a1 commit 92847fe

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

test/app.jsx

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,21 @@ class App extends React.Component {
131131
}
132132

133133
render() {
134-
const listSerialDevices = this.state.serialDevices.map((device, i) => <li key={i}>{device.Name} - IsOpen: <span className={device.IsOpen ? 'open' : 'closed'}>{device.IsOpen ? 'true' : 'false'}</span> - <a href="#" onClick={(e) => this.handleOpen(e, device.Name)}>open</a> - <a href="#" onClick={(e) => this.handleClose(e, device.Name)}>close</a></li>);
134+
const listSerialDevices = this.state.serialDevices.map((device, i) =>
135+
<li key={i}>
136+
{device.Name} - IsOpen: <span className={device.IsOpen ? 'open' : 'closed'}>
137+
{device.IsOpen ? 'true' : 'false'}
138+
</span> - <a href="#" onClick={(e) => this.handleOpen(e, device.Name)}>
139+
open
140+
</a> - <a href="#" onClick={(e) => this.handleClose(e, device.Name)}>
141+
close
142+
</a>
143+
</li>);
135144

136-
const listNetworkDevices = this.state.networkDevices.map((device, i) => <li key={i}>{device.Name}</li>);
145+
const listNetworkDevices = this.state.networkDevices.map((device, i) =>
146+
<li key={i}>
147+
{device.Name}
148+
</li>);
137149

138150
const supportedBoards = this.state.supportedBoards.map((board, i) =>
139151
<li key={i}>
@@ -154,15 +166,24 @@ class App extends React.Component {
154166
return (
155167
<div>
156168
<h1>Test Arduino Create Plugin</h1>
157-
<p>Agent status: <span id="agent-status" className={ this.state.agentStatus ? 'found' : 'not-found' }>
158-
{ this.state.agentStatus ? 'Found' : 'Not found' }
159-
</span></p>
160-
<p>Web socket status: <span id="ws-status" className={ this.state.wsStatus ? 'found' : 'not-found' }>
161-
{ this.state.wsStatus ? 'Connected' : 'Not connected' }
162-
</span></p>
169+
170+
<p>
171+
Agent status:
172+
<span id="agent-status" className={ this.state.agentStatus ? 'found' : 'not-found' }>
173+
{ this.state.agentStatus ? 'Found' : 'Not found' }
174+
</span>
175+
</p>
176+
<p>
177+
Web socket status:
178+
<span id="ws-status" className={ this.state.wsStatus ? 'found' : 'not-found' }>
179+
{ this.state.wsStatus ? 'Connected' : 'Not connected' }
180+
</span>
181+
</p>
182+
163183
<pre id="agent-info">
164184
{ this.state.agentInfo }
165185
</pre>
186+
166187
<div className="section">
167188
<h2>Devices</h2>
168189
<strong>serial:</strong>
@@ -195,6 +216,7 @@ class App extends React.Component {
195216
</form>
196217
<textarea id="serial-textarea" value={ this.state.serialMonitorContent }/>
197218
</div>
219+
198220
<div className="section">
199221
<button onClick={ this.handleUpload } disabled={ this.state.uploadStatus === UPLOAD_STATUS_IN_PROGRESS }>Upload Sketch</button>
200222
<div>Upload status: <span className={ uploadClass }> { this.state.uploadStatus }</span></div>

0 commit comments

Comments
 (0)