This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| currentUser: "XYZ", | |
| conversations: [ | |
| { | |
| user: "ABC", | |
| messages: [ | |
| { message1: "ABC#Hello World" , Date: 1827328 }, | |
| { message2: "XYZ#Hi whatsup??", Date: 1827328 }, | |
| { message3: "ABC#Hello buddy...", Date: 1827328 } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react' | |
| import './chat.css' | |
| import io from "socket.io-client"; | |
| import UserList from './userlist'; | |
| export default class Chat extends Component { | |
| constructor(props){ | |
| super(props); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react' | |
| import './chat.css' | |
| import io from "socket.io-client"; | |
| import UserList from './userlist'; | |
| export default class Chat extends Component { | |
| constructor(props){ | |
| super(props); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react' | |
| import './chat.css' | |
| import io from "socket.io-client"; | |
| import UserList from './userlist'; | |
| import { connect } from 'react-redux'; | |
| import { saveAuthor } from '../../store/actions/authorAction' | |
| import { saveMessages } from '../../store/actions/messageAction' | |
| class Chat extends Component { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { SAVE_AUTHOR, SAVE_MESSAGES, DELETE_AUTHOR, DELETE_MESSAGE } from '../actions/types'; | |
| const initialState = { | |
| author: '', | |
| message: '', | |
| messages: [] | |
| } | |
| export default function (state = initialState, action) { | |
| switch (action.type) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react' | |
| import './chat.css' | |
| import io from "socket.io-client"; | |
| import { connect } from 'react-redux'; | |
| import { saveAuthor } from '../../store/actions/authorAction' | |
| import { saveMessages } from '../../store/actions/messageAction' | |
| import { deleteAuthor } from '../../store/actions/deleteAuthorAction' | |
| import { fetchUsers } from '../../store/actions/userAction' | |
| class Chat extends Component { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react' | |
| import './chat.css' | |
| import io from "socket.io-client"; | |
| import { connect } from 'react-redux'; | |
| import { saveAuthor } from '../../store/actions/authorAction' | |
| import { saveMessages } from '../../store/actions/messageAction' | |
| import { deleteAuthor } from '../../store/actions/deleteAuthorAction' | |
| import { fetchUsers } from '../../store/actions/userAction' | |
| import { removeMessages } from '../../store/actions/removemessagesAction' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react' | |
| import './chat.css' | |
| import io from "socket.io-client"; | |
| import { connect } from 'react-redux'; | |
| import { saveAuthor } from '../../store/actions/authorAction' | |
| import { saveMessages } from '../../store/actions/messageAction' | |
| import { deleteAuthor } from '../../store/actions/deleteAuthorAction' | |
| import { fetchUsers } from '../../store/actions/userAction' | |
| import { removeMessages } from '../../store/actions/removemessagesAction' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { SAVE_AUTHOR, SAVE_MESSAGES, DELETE_AUTHOR } from '../actions/types'; | |
| const initialState = { | |
| author: '', | |
| message: '', | |
| messages: [] | |
| } | |
| export default function (state = initialState, action) { | |
| switch (action.type) { |