This file contains 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
// src/feathers.js | |
import io from 'socket.io-client' | |
import feathers from '@feathersjs/client' | |
// Socket.io is exposed as the `io` global. | |
const socket = io('http://localhost:3030') | |
// @feathersjs/client is exposed as the `feathers` global. | |
const client = feathers() | |
.configure(feathers.socketio(socket)) | |
//incase we later have to do authentication | |
.configure( |
This file contains 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
// src/DisplayGrid.js | |
import React,{Component} from 'react' | |
import { Container,Divider,Header,Card,Button } from 'semantic-ui-react'; | |
import {Link} from 'react-router-dom' | |
import client from './feathers' | |
export default class DisplayGrid extends Component { | |
state = { | |
products:[] | |
}; |
This file contains 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
// src/CreateProductForm.js | |
import React, { Component } from 'react'; | |
import {Container,Header,Form, Button,Divider,TextArea} from 'semantic-ui-react'; | |
import client from './feathers' | |
export default class CreateProductForm extends Component { | |
state = { | |
product:{ | |
name:'', | |
description:'', |
This file contains 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
// src/DisplayGrid.js | |
import React,{Component} from 'react' | |
import { Container,Divider,Header,Card,Button } from 'semantic-ui-react'; | |
import {Link} from 'react-router-dom' | |
import client from './feathers' | |
export default class DisplayGrid extends Component { | |
state = { | |
products:[] | |
}; |
This file contains 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
//add this to feather's src/channels.js around line 53 | |
app.service(‘products’) | |
.publish(‘created’, () => app.channel(‘anonymous’)); |
This file contains 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
// src/CreateProductForm.js | |
import React, { Component } from 'react'; | |
import { Form, Button} from 'semantic-ui-react'; | |
import client from './feathers' | |
export default class CreateProductForm extends Component { | |
state = { | |
product:{ | |
name:'', | |
description:'', | |
price:null |
This file contains 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 { Input,Card,Statistic,Button } from 'semantic-ui-react' | |
import PropTypes from 'prop-types' | |
import WithStockQuantities from './WithStockQuantities' | |
function AirtimeCard ({card,name,logedIn}){ | |
return ( |
This file contains 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 PropTypes from 'prop-types' | |
import { connect } from 'react-redux'; | |
import { compose } from 'recompose'; | |
import {services} from '../../services' | |
class WithNetworks extends Component{ | |
componentDidMount(){ | |
const { findNetworks}=this.props |
This file contains 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 PropTypes from 'prop-types' | |
import {compose} from 'recompose' | |
import {connect} from 'react-redux' | |
import { | |
Divider, Message,Container | |
} from 'semantic-ui-react'; | |
import { withRouter,} from 'react-router-dom' | |
import withAuthorization from './hocs/withAuthorization' | |
import SetUpProfile from './dashboardComponents/SetUpProfile' |
This file contains 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 PropTypes from 'prop-types' | |
import { compose } from 'recompose' | |
import {connect} from 'react-redux' | |
import { | |
withRouter, | |
} from 'react-router-dom'; | |
import { | |
Divider, Message,Container,Header |