This file contains hidden or 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
// ... | |
export class App extends React.Component | |
{ | |
static propTypes = { | |
auth: PropTypes.object.isRequired | |
}; | |
render() { | |
// ... |
This file contains hidden or 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 authType from './authType'; | |
import { LIKE_POST_SUCCESS } from '../actions/actionTypes'; | |
export default function authReducer(state = authType, action) { | |
switch (action.type) { | |
// ... | |
case types.LIKE_POST_SUCCESS: | |
return { | |
...state, | |
...{ |
This file contains hidden or 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 { render } from 'react-dom'; | |
import { BrowserRouter as Router , Route, Link } from 'react-router-dom'; | |
import SuperAgent from 'superagent'; | |
class Home extends Component { | |
render(){ | |
return ( | |
<div className="page-content">TEST | |
</div>); |
This file contains hidden or 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
export class Pousada { | |
slug: string; | |
title: string; | |
location: string; | |
lat: string; | |
long: string; | |
images: { | |
main: string | |
}; | |
} |
This file contains hidden or 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
// object structure | |
{ | |
id: '57dce89f84bec9ff038b456d', | |
slug: 'toronto', | |
country: { | |
id: '564e85d284bec915048b4568' | |
}, | |
views: 14, | |
comments: [ | |
{ |
This file contains hidden or 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 PropTypes from 'prop-types'; | |
import { connect } from 'react-redux'; | |
import { Link } from 'react-router'; | |
import moment from 'moment'; | |
import { Button, Comment, Form, Header, Message, Divider } from 'semantic-ui-react'; | |
import { sprintf } from 'sprintf-js'; | |
import * as validationRules from '../../../resources/ValidationRules'; | |
import I18n from '../../../helpers/I18n'; |
This file contains hidden or 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
<div> | |
<h1>{{pousada.title}}</h1> | |
<small>{{pousada.location}}</small> | |
<iframe | |
width="600" | |
height="450" | |
frameborder="0" style="border:0" | |
src="https://www.google.com/maps/embed/v1/place?key={{googleMapsKey}} | |
&q=Space+Needle,Seattle+WA" allowfullscreen |
This file contains hidden or 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 { Component } from '@angular/core' | |
@Component({ | |
selector: 'app', | |
template: ` | |
<div> | |
<h2>Hello {{name}}</h2> | |
</div> | |
`, | |
}) |
This file contains hidden or 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, { PropTypes } from 'react'; | |
import { Message } from 'semantic-ui-react'; | |
import I18n from '../../helpers/I18n'; | |
const ErrorBlock = ({errors}) => { | |
let errorList = []; | |
for (let error in errors) { | |
errorList.push(errors[error]); | |
} |
This file contains hidden or 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, {PropTypes} from 'react'; | |
import {Form} from 'semantic-ui-react'; | |
import I18n from '../../helpers/I18n'; | |
const AdForm = ({ad, onChange}) => { | |
return ( | |
<Form> | |
<h1>{i18n.ad.new}</h1> | |
<Form.Input |