Skip to content

Commit

Permalink
more refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
shomilj committed Nov 26, 2020
1 parent a0c6cc1 commit 0793326
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
24 changes: 0 additions & 24 deletions client/src/components/home/filterview.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,30 +72,6 @@ class FilterBox extends React.Component {
enteredSearchTerm = (e) => {
if (e.keyCode == 13) {
this.props.updateSearch(this.state)
// var query = []
// var parts = this.state.question.split(' ');
// var coursesToAdd = [];
// for (var i = 0; i < parts.length; i++) {
// var part = parts[i];
// if (coursemap[part.toLowerCase()] != null) {
// if (i > 0 && ['cs', 'ee', 'eecs'].includes(parts[i-1].toLowerCase())) {
// query[i-1] = ''
// };
// coursesToAdd.push(coursemap[part.toLowerCase()]);
// } else {
// query.push(part);
// }
// }
// var existingCourses = this.state.courses;
// for (var i = 0; i < coursesToAdd; i++) {
// if (!existingCourses.includes(coursesToAdd[i])) {
// existingCourses.push(coursesToAdd[i]);
// }
// }
// console.log('Courses: ' + existingCourses);
// this.setState({question: query.join(' '), courses: existingCourses}, () => {
// this.props.updateSearch(this.state)
// });
}
}

Expand Down
9 changes: 0 additions & 9 deletions client/src/components/home/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ import ListView from './listview.js'
import DetailView from './detailview.js'
import { Row, Container } from 'react-bootstrap';

/*
React Architecture:
NavBar => Component
Filters => Component
CardList => Component
CardView => Component
*/

export default function Home() {
return (
<div>
Expand Down
2 changes: 2 additions & 0 deletions client/src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* FULL CREDITS GO TO BERKELEYTIME.ORG FOR THIS CSS STYLE FRAMEWORK. */

body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
Expand Down

0 comments on commit 0793326

Please sign in to comment.