mirror of
https://github.com/mgerb/react-starter
synced 2026-01-10 09:02:49 +00:00
formatting
This commit is contained in:
@@ -8,16 +8,11 @@ import NotFound from './pages/NotFound/NotFound';
|
||||
//styling
|
||||
import './scss/index.scss';
|
||||
|
||||
interface Props {
|
||||
interface Props {}
|
||||
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
||||
}
|
||||
interface State {}
|
||||
|
||||
export default class Wrapper extends React.Component<Props, State> {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
|
||||
@@ -3,5 +3,4 @@ import ReactDOM from 'react-dom';
|
||||
|
||||
import Wrapper from './Wrapper';
|
||||
|
||||
ReactDOM.render( <Wrapper/>
|
||||
, document.getElementById('app'));
|
||||
ReactDOM.render(<Wrapper />, document.getElementById('app'));
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
& + .Navbar__item {
|
||||
border-left: 1px solid $light3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.Navbar__item--active {
|
||||
|
||||
@@ -3,16 +3,11 @@ import { NavLink } from 'react-router-dom';
|
||||
|
||||
import './Navbar.scss';
|
||||
|
||||
interface Props {
|
||||
interface Props {}
|
||||
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
||||
}
|
||||
interface State {}
|
||||
|
||||
export default class Navbar extends React.Component<Props, State> {
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
}
|
||||
@@ -22,17 +17,31 @@ export default class Navbar extends React.Component<Props, State> {
|
||||
<div className="Navbar">
|
||||
<div className="Navbar__header">
|
||||
<span>React Starter</span>
|
||||
<a href="https://github.com/mgerb/react-webpack2-seed">GitHub
|
||||
<a href="https://github.com/mgerb/react-webpack2-seed">
|
||||
GitHub
|
||||
<i className="fa fa-github" aria-hidden="true" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className="Navbar__nav">
|
||||
<NavLink to="/" className="Navbar__item" exact activeClassName="Navbar__item--active">Home</NavLink>
|
||||
<NavLink to="/new" className="Navbar__item" exact activeClassName="Navbar__item--active">New</NavLink>
|
||||
<NavLink
|
||||
to="/"
|
||||
className="Navbar__item"
|
||||
exact
|
||||
activeClassName="Navbar__item--active"
|
||||
>
|
||||
Home
|
||||
</NavLink>
|
||||
<NavLink
|
||||
to="/new"
|
||||
className="Navbar__item"
|
||||
exact
|
||||
activeClassName="Navbar__item--active"
|
||||
>
|
||||
New
|
||||
</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,26 +3,16 @@ import { RouteComponentProps } from 'react-router-dom';
|
||||
|
||||
import './Home.scss';
|
||||
|
||||
interface Props extends RouteComponentProps<any> {
|
||||
interface Props extends RouteComponentProps<any> {}
|
||||
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
||||
}
|
||||
interface State {}
|
||||
|
||||
export default class Home extends React.Component<Props, State> {
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="Home">
|
||||
test 123
|
||||
</div>
|
||||
);
|
||||
return <div className="Home">test 123</div>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,26 +3,16 @@ import { RouteComponentProps } from 'react-router-dom';
|
||||
|
||||
import './NotFound.scss';
|
||||
|
||||
interface Props extends RouteComponentProps<any> {
|
||||
interface Props extends RouteComponentProps<any> {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
interface State {
|
||||
|
||||
}
|
||||
interface State {}
|
||||
|
||||
export default class NotFound extends React.Component<Props, State> {
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="NotFound">
|
||||
404 Not Found
|
||||
</div>
|
||||
);
|
||||
return <div className="NotFound">404 Not Found</div>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user