Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

Commit

Permalink
Remove unused imports and credit uuid generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry committed Feb 16, 2018
1 parent 04df888 commit c5048c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/App.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//React
import React from 'react';
//Router
import { Route, Switch, Link } from 'react-router-dom';
import { Route, Switch } from 'react-router-dom';
//Components
import './App.css';
import Header from './Header';
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/components/Comment/NewComment.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class NewComment extends Component {
return text.trim().replace(/[&<>"']/g, function(m) { return map[m]; });
};

/*
uuid from:
https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
*/
generateUUID = () => {
let d = new Date().getTime();
if(typeof performance !== 'undefined'
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/Pages/NewPost.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//React
import React, { Component } from 'react';
import PropTypes from 'prop-types';
//Redux
import { connect } from 'react-redux';
import { fetchCategories } from '../../actions';
Expand Down Expand Up @@ -35,6 +34,10 @@ class NewPost extends Component {
return text.trim().replace(/[&<>"']/g, function(m) { return map[m]; });
};

/*
uuid from:
https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
*/
generateUUID = () => {
let d = new Date().getTime();
if(typeof performance !== 'undefined'
Expand Down Expand Up @@ -137,9 +140,6 @@ function mapDispatchToProps (dispatch) {
}
}

NewPost.propTypes = {
};

export default connect(
mapStateToProps,
mapDispatchToProps
Expand Down

0 comments on commit c5048c4

Please sign in to comment.