Skip to content

Commit 9d6a56b

Browse files
committed
Build: typescript version
1 parent 51fce10 commit 9d6a56b

File tree

6 files changed

+962
-908
lines changed

6 files changed

+962
-908
lines changed

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@
2424
"react-redux": "^7.2.0",
2525
"react-router-config": "^5.1.1",
2626
"react-router-dom": "^5.1.2",
27-
"react-scripts": "3.4.0",
28-
"redux": "^4.0.5",
29-
"redux-immutable": "^4.0.0",
30-
"redux-thunk": "^2.3.0",
27+
"react-scripts": "3.4.1",
3128
"styled-components": "^5.0.1",
3229
"timeago.js": "^4.0.2",
3330
"typescript": "^3.8.3"

src/App.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@ import { BaseLayout } from './layouts'
33
import { GlobalStyle } from './style/global'
44
import { BrowserRouter, Switch, Route } from 'react-router-dom'
55

6+
const basename: string = process.env.NODE_ENV === 'production'
7+
? '/cnode'
8+
: '/'
9+
610
const App: React.FC = (props) => {
711
return (
812
<div className="App">
9-
<BrowserRouter basename={ '/cnode' }>
13+
<BrowserRouter basename={basename}>
1014
<GlobalStyle />
1115

1216
<Switch>

src/components/scroll-list/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import styled from 'styled-components'
66
// polyfill
77
import 'intersection-observer'
88

9-
export interface Iprops {
9+
export interface IProps {
1010
loading: boolean;
1111
completed: boolean;
1212
children: React.ReactNode;
@@ -19,7 +19,7 @@ const TipWord = styled.div`
1919
text-align: center;
2020
`
2121

22-
const ScrollList: React.FC<Iprops> = (props: Iprops) => {
22+
const ScrollList: React.FC<IProps> = (props: IProps) => {
2323
const { completed, onLoad, loading } = props
2424

2525
const hanlder = useCallback(entries => {

src/components/tabbar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ export interface Tabber {
77
route: string;
88
}
99

10-
interface Iprops {
10+
interface IProps {
1111
value: Array<Tabber>;
1212
}
1313

14-
const Tabbar: React.FC<Iprops> = (props: Iprops) => {
14+
const Tabbar: React.FC<IProps> = (props: IProps) => {
1515
return (
1616
<TabbarWrapper>
1717
{

src/components/tag/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
COLOR_GREY_INFO
1111
} from 'style/constants'
1212

13-
interface Iprops {
13+
interface IProps {
1414
type: string
1515
}
1616

@@ -42,7 +42,7 @@ const TagUI = styled.label<{ color: string }>`
4242
border-radius: 4px;
4343
`
4444

45-
const Tag: React.FC<Iprops> = (props: Iprops) => {
45+
const Tag: React.FC<IProps> = (props: IProps) => {
4646
const type = props.type || 'default'
4747
return <TagUI color={ DICT[type].color }>{ DICT[type].text }</TagUI>
4848
}

0 commit comments

Comments
 (0)