Skip to content

Commit

Permalink
change some files from js to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
sunface committed Jan 16, 2020
1 parent 891462a commit 84444c7
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ui/src/components/ConfigProvider/index.tsx
Expand Up @@ -8,7 +8,7 @@ const Config = inject('system')(observer((props:any) =>{
let {system} = props
return (
<>
<ConfigProvider locale={system.locale=='zh_CN' ? zhCN : enGB}>
<ConfigProvider locale={system.locale==='zh_CN' ? zhCN : enGB}>
{props.children}
</ConfigProvider>
</>
Expand Down
1 change: 0 additions & 1 deletion ui/src/components/Languages/index.tsx
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import { Icon } from 'antd'
import { inject, observer } from 'mobx-react'
import style from './index.module.less'
import System from '../../store/system'
const Languages = inject('system')(observer((props) =>{
let {system} = props

Expand Down
3 changes: 1 addition & 2 deletions ui/src/layouts/Breadcrumb/index.tsx
Expand Up @@ -5,8 +5,7 @@ import style from './index.module.less'
import { inject, observer } from 'mobx-react'
import { FormattedMessage as Message } from 'react-intl'

const BreadcrumbWrapper = inject('system')(observer((props) =>{
let {system} = props
const BreadcrumbWrapper = inject('system')(observer((props) =>{
let location = useLocation()
let pathname = location.pathname.split('/')
return (
Expand Down
9 changes: 4 additions & 5 deletions ui/src/pages/App/index.tsx
@@ -1,6 +1,5 @@
import React, { useEffect } from 'react'
import {Route, Switch, Redirect} from 'react-router-dom'
import { modifyVars } from '../../library/utils/modifyVars'
import { inject, observer } from 'mobx-react'
import '@/styles/main.less'
import Home from '../../pages/Index'
Expand All @@ -10,12 +9,12 @@ import Intl from '../../components/Intl'


let App = inject('system')(observer((props:any) => {
let {system} = props
//npm install --save rc-form-hooks
// https://www.jianshu.com/p/fc59cb61f7cc
//
useEffect(() => {
console.log("modify vars")
modifyVars(system.dark, system.primary)
// console.log("modify vars")
// alert(1)
// modifyVars(system.dark, system.primary)
return () => {}
})
return (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -7,7 +7,7 @@ function Paginations() {
setLoading(false)
return () => {}
}, [])
function onShowSizeChange(current, pageSize) {
function onShowSizeChange(current:number, pageSize:number) {
console.log(current, pageSize)
}
return (
Expand Down
1 change: 0 additions & 1 deletion ui/src/pages/Index/index.tsx
Expand Up @@ -21,7 +21,6 @@ let Index = inject('system')(observer((props:any) => {
// })
let history = useHistory()
useEffect(() => {
alert(11)
if(isEmpty(getToken())){
history.push('/login')
}
Expand Down
1 change: 0 additions & 1 deletion ui/tsconfig.json
Expand Up @@ -18,7 +18,6 @@
"isolatedModules": true,
"noEmit": true,
"jsx": "react",

"experimentalDecorators": true
},
"include": [
Expand Down

0 comments on commit 84444c7

Please sign in to comment.