Skip to content

Commit 30f259d

Browse files
committed
fix: merge with master
1 parent 558e462 commit 30f259d

File tree

4 files changed

+24
-64
lines changed

4 files changed

+24
-64
lines changed

client/components/PopupMain/index.jsx

+13-7
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22

33
import React, { Component } from 'react'
44
import { connect } from 'react-redux'
5+
import { Login, Signup } from '../auth-form'
6+
import { me } from '../../store'
7+
import { UserHome } from '../'
58
import $ from 'jquery'
69

10+
711
class PopupMain extends Component {
8-
constructor(){
9-
super()
10-
this.state = {
11-
buttonToggle: true
12+
constructor(){
13+
super()
14+
this.state = {
15+
buttonToggle: true
16+
}
17+
this.handleClick = this.handleClick.bind(this)
1218
}
13-
this.handleClick = this.handleClick.bind(this)
14-
}
1519

1620
componentDidMount () {
1721
this.props.loadInitialData()
@@ -34,7 +38,9 @@ constructor(){
3438

3539
return (
3640
<div>
37-
<button id = "toggle" type="button" onClick={ this.handleClick }>toggle popup</button>
41+
<button id = "toggle" type="button" onClick={ this.handleClick }>
42+
toggle popup
43+
</button>
3844
{
3945
isLoggedIn
4046
? <UserHome />

client/components/QuestionMenu/MapQuestions.jsx

-36
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { setQuestion } from '../../store'
66
//import react-semantic-ui?
77

88

9-
<<<<<<< HEAD
109
const MapQuestions = props => {
1110
const sortedQuestions = props.questions && props.questions.sort((q1, q2) => q1.id - q2.id)
1211

@@ -16,28 +15,6 @@ const MapQuestions = props => {
1615
<div key={ question.id }>
1716
<button onClick={ () => props.setQuestion(question) }>
1817
<div className="content">{ question.description }</div>
19-
=======
20-
class MapQuestions extends Component {
21-
constructor(props) {
22-
super(props)
23-
}
24-
25-
componentDidMount () {
26-
this.props.fetchQuestions() // whatever the url is here
27-
28-
}
29-
30-
render() {
31-
const sortedQuestions = this.props.questions.sort((q1, q2) => q1.id - q2.id)
32-
return (
33-
34-
<div>
35-
{ this.props.questions &&
36-
sortedQuestions.map(question => (
37-
<div key={ question.id }>
38-
<button onClick={() => this.props.handleClick(question, question.boilerplate)}>Question { question.id }</button>
39-
<div className="content">
40-
>>>>>>> master
4118
<div className="metadata">
4219
{/* <Rating
4320
icon="star"
@@ -46,23 +23,10 @@ class MapQuestions extends Component {
4623
disabled
4724
/> */}
4825
</div>
49-
<<<<<<< HEAD
5026
</button>
5127
</div>
5228
))
5329
)
54-
=======
55-
<div className="text">{ /* virtual field for snippet */ }</div>
56-
</div>
57-
</div>
58-
))
59-
}
60-
</div>
61-
62-
)
63-
}
64-
65-
>>>>>>> master
6630
}
6731

6832
const mapDispatch = dispatch => ({

client/components/Repl/example/index.jsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { withRouter } from 'react-router-dom'
66
import { render } from 'react-dom'
77
import AceEditor from '../src/ace.jsx'
88
import 'brace/mode/jsx'
9-
import { fetchInput, postInput, fetchQuestions } from '../../../store'
9+
import { fetchInput, postInput, getQuestion } from '../../../store'
1010

1111
const debounce = require('lodash.debounce')
1212
const languages= ['javascript']
@@ -24,7 +24,7 @@ import 'brace/ext/language_tools'
2424
import 'brace/ext/searchbox'
2525

2626

27-
class AppClass extends Component {
27+
class App extends Component {
2828
onChange (newValue) {
2929
this.setState({ value: newValue })
3030
//this.setChromeStorage()
@@ -55,13 +55,9 @@ class AppClass extends Component {
5555
showLineNumbers: true,
5656
result: ''
5757
}
58-
this.setTheme = this.setTheme.bind(this)
59-
this.setMode = this.setMode.bind(this)
6058
this.onChange = this.onChange.bind(this)
6159
this.setFontSize = this.setFontSize.bind(this)
62-
this.setBoolean = this.setBoolean.bind(this)
6360
this.handleClick = this.handleClick.bind(this)
64-
this.handleSave = this.handleSave.bind(this)
6561
this.handleClear = this.handleClear.bind(this)
6662
this.setChromeStorage = this.setChromeStorage.bind(this)
6763
this.getChromeStorage = this.getChromeStorage.bind(this)

server/index.js

+9-15
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ passport.deserializeUser((id, done) =>
2828

2929
const createApp = () => {
3030

31-
// logging middleware
31+
// logging middleware
3232
app.use(morgan('dev'))
3333

34-
// body parsing middleware
34+
// body parsing middleware
3535
app.use(bodyParser.json())
3636
app.use(bodyParser.urlencoded({ extended: true }))
3737

38-
// compression middleware
38+
// compression middleware
3939
app.use(compression())
4040

41-
// session middleware with passport
41+
// session middleware with passport
4242
app.use(session({
4343
secret: process.env.SESSION_SECRET || 'my best friend is Cody',
4444
store: sessionStore,
@@ -48,25 +48,21 @@ const createApp = () => {
4848
app.use(passport.initialize())
4949
app.use(passport.session())
5050

51-
// auth and api routes
51+
// auth and api routes
5252
app.use('/auth', require('./auth'))
5353
app.use('/api', require('./api'))
5454

55-
// static file-serving middleware
55+
// static file-serving middleware
5656
app.use(express.static(path.join(__dirname, '..', 'chrome/js')))
5757

58-
// sends index.html
58+
// sends index.html
5959
app.use('*', (req, res) => {
6060
res.sendFile(path.join(__dirname, '..', 'chrome/views/index.html'))
6161
})
6262

63-
// any remaining requests with an extension (.js, .css, etc.) send 404
64-
<<<<<<< HEAD
63+
// any remaining requests with an extension (.js, .css, etc.) send 404
6564
.use((req, res, next) => {
6665
console.log(req.path)
67-
=======
68-
app.use((req, res, next) => {
69-
>>>>>>> master
7066
if (path.extname(req.path).length) {
7167
const err = new Error('Not found')
7268
err.status = 404
@@ -76,7 +72,7 @@ const createApp = () => {
7672
}
7773
})
7874

79-
// error handling endware
75+
// error handling endware
8076
app.use((err, req, res, next) => {
8177
console.error(err)
8278
console.error(err.stack)
@@ -87,8 +83,6 @@ const createApp = () => {
8783
const startListening = () => {
8884
// start listening (and create a 'server' object representing our server)
8985
const server = app.listen(PORT, () => console.log(`Havin a party on port ${ PORT }`))
90-
91-
9286
}
9387

9488
const syncDb = () => db.sync()

0 commit comments

Comments
 (0)