Skip to content

Instantly share code, notes, and snippets.

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) {
.ui.form.formStyle {
margin-left: 300px ;
margin-top: 100px ;
width: 550px ;
height: 400px;
}
.ui.button.buttonStyle {
border-radius: 18px;
width: 200px;
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>
);
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}>
import { SAVE_AUTHOR, SAVE_MESSAGES, DELETE_AUTHOR } from '../actions/types';
const initialState = {
author: '',
message: '',
messages: []
}
export default function (state = initialState, action) {
switch (action.type) {
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'
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'
@aditodkar
aditodkar / chat.js
Last active November 25, 2018 16:11
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 {
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) {
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 {