Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: connectSocket typo #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ui/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import * as socketAction from './redux/actions/socket'
export const store = configureStore()

if (window.localStorage.getItem('isLogin')) {
socketAction.connetctSocket()
socketAction.connectSocket()
}

if (module.hot) {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/src/redux/actions/login/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const userLogin = ({username, password, type, success}) => {
window.localStorage.setItem('isLogin', true)
window.localStorage.setItem('authToken', response.data.token)
window.localStorage.setItem('username', response.data.currentAuthority)
// connetctSocket()
// connectSocket()
window.location.href = '/'
success && success()
} else if (response.code === 1) {
Expand Down
4 changes: 2 additions & 2 deletions src/ui/src/redux/actions/socket/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const setSocketStatus = (data) => ({
payload: data
})

const connetctSocket = () => {
const connectSocket = () => {
const authToken = window.localStorage.getItem('authToken')
let host = getHost()
if (host === '') {
Expand Down Expand Up @@ -118,6 +118,6 @@ const socketMessage = (e) => {
export {
setSocketData,
setSocketStatus,
connetctSocket,
connectSocket,
TYPE
}
2 changes: 1 addition & 1 deletion src/ui/src/views/Worktop/ServiceStatus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const { Row, Col } = Grid

class ServiceStatus extends Component {
componentDidMount () {
socketAction.connetctSocket()
socketAction.connectSocket()

// set BreadCrumbs
const crumbsItems = [
Expand Down