mirror of
https://github.com/mgerb/react-starter
synced 2026-01-10 09:02:49 +00:00
convert to typescript - react-router upgrade to 4
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
import './Home.scss';
|
||||
|
||||
export default class Home extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="Home">
|
||||
test 123
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
28
app/pages/Home/Home.tsx
Normal file
28
app/pages/Home/Home.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import { RouteComponentProps } from 'react-router-dom';
|
||||
|
||||
import './Home.scss';
|
||||
|
||||
interface Props extends RouteComponentProps<any> {
|
||||
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
||||
}
|
||||
|
||||
export default class Home extends React.Component<Props, State> {
|
||||
|
||||
constructor(props: Props){
|
||||
super(props);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="Home">
|
||||
test 123
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import React from 'react';
|
||||
import './NotFound.scss';
|
||||
|
||||
export default class Default extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="NotFound">
|
||||
404 Not Found
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
28
app/pages/NotFound/NotFound.tsx
Normal file
28
app/pages/NotFound/NotFound.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import { RouteComponentProps } from 'react-router-dom';
|
||||
|
||||
import './NotFound.scss';
|
||||
|
||||
interface Props extends RouteComponentProps<any> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
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>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user