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
const path = require("path"); | |
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
const CleanWebpackPlugin = require("clean-webpack-plugin"); | |
const settings = { | |
distPath: path.join(__dirname, "dist"), | |
srcPath: path.join(__dirname, "src") | |
}; | |
function srcPathExtend(subpath) { |
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
.ui.form.formStyle { | |
margin-left: 300px ; | |
margin-top: 100px ; | |
width: 550px ; | |
height: 400px; | |
} | |
.ui.button.buttonStyle { | |
border-radius: 18px; | |
width: 200px; |
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 from "react"; | |
import { Button, Form, Header } from "semantic-ui-react"; | |
import styles from './styles.css' | |
const LoginForm = () => ( | |
//Instead of <Form style={formStyle}> | |
<Form style={styles.formStyle}> | |
</Form> | |
); |
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 from "react"; | |
import { Button, Form, Header } from "semantic-ui-react"; | |
const LoginForm = () => ( | |
<Form style={formStyle}> | |
<Header style={title} as='h1'>Account Portal Login</Header> | |
<Header style={info} as='h5'>Please login with your URN number. If you have not been assigned a | |
password, you can create one below and login afterwards</Header> | |
<Header style={info} as='h4'>Please login below</Header> | |
<Form.Field style={formField}> |
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) { |
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 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 { 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 UserList from './userlist'; | |
import { connect } from 'react-redux'; | |
import { saveAuthor } from '../../store/actions/authorAction' | |
import { saveMessages } from '../../store/actions/messageAction' | |
class Chat extends Component { |