Skip to content

Commit c1b808f

Browse files
Fix code style inconsistencies
1 parent c668387 commit c1b808f

File tree

6 files changed

+31
-31
lines changed

6 files changed

+31
-31
lines changed

templates/ReactSpa/ClientApp/components/Counter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ interface CounterState {
44
currentCount: number;
55
}
66

7-
export class Counter extends React.Component<void, CounterState> {
7+
export class Counter extends React.Component<any, CounterState> {
88
constructor() {
99
super();
1010
this.state = { currentCount: 0 };

templates/ReactSpa/ClientApp/components/FetchData.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interface FetchDataExampleState {
55
loading: boolean;
66
}
77

8-
export class FetchData extends React.Component<void, FetchDataExampleState> {
8+
export class FetchData extends React.Component<any, FetchDataExampleState> {
99
constructor() {
1010
super();
1111
this.state = { forecasts: [], loading: true };
@@ -31,7 +31,7 @@ export class FetchData extends React.Component<void, FetchDataExampleState> {
3131
}
3232

3333
private static renderForecastsTable(forecasts: WeatherForecast[]) {
34-
return <table className="table">
34+
return <table className='table'>
3535
<thead>
3636
<tr>
3737
<th>Date</th>

templates/ReactSpa/ClientApp/components/Home.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import * as React from 'react';
22

3-
export class Home extends React.Component<void, void> {
3+
export class Home extends React.Component<any, void> {
44
public render() {
55
return <div>
66
<h1>Hello, world!</h1>
77
<p>Welcome to your new single-page application, built with:</p>
88
<ul>
9-
<li><a href="https://get.asp.net/">ASP.NET Core</a> and <a href="https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx">C#</a> for cross-platform server-side code</li>
10-
<li><a href="https://facebook.github.io/react/">React</a> and <a href="http://www.typescriptlang.org/">TypeScript</a> for client-side code</li>
11-
<li><a href="https://webpack.github.io/">Webpack</a> for building and bundling client-side resources</li>
12-
<li><a href="http://getbootstrap.com/">Bootstrap</a> for layout and styling</li>
9+
<li><a href='https://get.asp.net/'>ASP.NET Core</a> and <a href='https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx'>C#</a> for cross-platform server-side code</li>
10+
<li><a href='https://facebook.github.io/react/'>React</a> and <a href='http://www.typescriptlang.org/'>TypeScript</a> for client-side code</li>
11+
<li><a href='https://webpack.github.io/'>Webpack</a> for building and bundling client-side resources</li>
12+
<li><a href='http://getbootstrap.com/'>Bootstrap</a> for layout and styling</li>
1313
</ul>
1414
<p>To help you get started, we've also set up:</p>
1515
<ul>

templates/ReactSpa/ClientApp/components/Layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ export interface LayoutProps {
77

88
export class Layout extends React.Component<LayoutProps, void> {
99
public render() {
10-
return <div className="container-fluid">
11-
<div className="row">
12-
<div className="col-sm-3">
10+
return <div className='container-fluid'>
11+
<div className='row'>
12+
<div className='col-sm-3'>
1313
<NavMenu />
1414
</div>
15-
<div className="col-sm-9">
15+
<div className='col-sm-9'>
1616
{ this.props.body }
1717
</div>
1818
</div>

templates/ReactSpa/ClientApp/components/NavMenu.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
import * as React from 'react';
22
import { Link } from 'react-router';
33

4-
export class NavMenu extends React.Component<void, void> {
4+
export class NavMenu extends React.Component<any, void> {
55
public render() {
6-
return <div className="main-nav">
7-
<div className="navbar navbar-inverse">
8-
<div className="navbar-header">
9-
<button type="button" className="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
10-
<span className="sr-only">Toggle navigation</span>
11-
<span className="icon-bar"></span>
12-
<span className="icon-bar"></span>
13-
<span className="icon-bar"></span>
6+
return <div className='main-nav'>
7+
<div className='navbar navbar-inverse'>
8+
<div className='navbar-header'>
9+
<button type='button' className='navbar-toggle' data-toggle='collapse' data-target='.navbar-collapse'>
10+
<span className='sr-only'>Toggle navigation</span>
11+
<span className='icon-bar'></span>
12+
<span className='icon-bar'></span>
13+
<span className='icon-bar'></span>
1414
</button>
15-
<Link className="navbar-brand" to={ '/' }>WebApplicationBasic</Link>
15+
<Link className='navbar-brand' to={ '/' }>WebApplicationBasic</Link>
1616
</div>
17-
<div className="clearfix"></div>
18-
<div className="navbar-collapse collapse">
19-
<ul className="nav navbar-nav">
17+
<div className='clearfix'></div>
18+
<div className='navbar-collapse collapse'>
19+
<ul className='nav navbar-nav'>
2020
<li>
2121
<Link to={ '/' } activeClassName='active'>
22-
<span className="glyphicon glyphicon-home"></span> Home
22+
<span className='glyphicon glyphicon-home'></span> Home
2323
</Link>
2424
</li>
2525
<li>
2626
<Link to={ '/counter' } activeClassName='active'>
27-
<span className="glyphicon glyphicon-education"></span> Counter
27+
<span className='glyphicon glyphicon-education'></span> Counter
2828
</Link>
2929
</li>
3030
<li>
3131
<Link to={ '/fetchdata' } activeClassName='active'>
32-
<span className="glyphicon glyphicon-th-list"></span> Fetch data
32+
<span className='glyphicon glyphicon-th-list'></span> Fetch data
3333
</Link>
3434
</li>
3535
</ul>

templates/ReactSpa/ClientApp/routes.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { FetchData } from './components/FetchData';
66
import { Counter } from './components/Counter';
77

88
export const routes = <Route component={ Layout }>
9-
<Route path="/" components={{ body: Home }} />
10-
<Route path="/counter" components={{ body: Counter }} />
11-
<Route path="/fetchdata" components={{ body: FetchData }} />
9+
<Route path='/' components={{ body: Home }} />
10+
<Route path='/counter' components={{ body: Counter }} />
11+
<Route path='/fetchdata' components={{ body: FetchData }} />
1212
</Route>;

0 commit comments

Comments
 (0)