Skip to content

Instantly share code, notes, and snippets.

View nicholasess's full-sized avatar
🎯
Focusing

Nicholas Eduardo nicholasess

🎯
Focusing
View GitHub Profile
export default class ModalSuccess extends Component {
constructor() {
super();
this.state = {
active: false,
title: "Centro de Custo adicionado com sucesso!"
};
this.setTitle = this.setTitle.bind(this);
this.show = this.show.bind(this);
<div>
<md-content class="md-padding">
<div>
<form name="reviewsForm">
<div layout="row">
<md-input-container>
<label for="reviewsFormCustomers">Cliente</label>
<md-select id="reviewsFormCustomers" ng-model="reviewsFormModel.customer" ng-change="selectedCustomer(reviewsFormModel.customer)">
<md-option ng-repeat="customer in customers" ng-value="customer._id">
{{ ::customer.name }}
São Paulo - Santos
Pegar onibus no jabaquara sentido Santos - Só não pega o cometa, pois ele demora e é caro.
Chegando em Santos
Descer no terminal rodoviario e ir para o terminal de onibus
Pedir informação para saber o número do onibus que vai para o ferry boat
Santos - Guaruja
Chegando no ferry boat, pegar a barquinha, que atravessa para Guaruja
className={`class1 ${counter == 10 ? "active" : ""}`}
import React from 'react';
import { asyncComponent } from '@jaredpalmer/after';
export default [
{
path: '/',
exact: true,
component: asyncComponent({
loader: () => import('./Home'), // required
const razzleHeroku = require("razzle-heroku");
module.exports = {
modify: (config, { target, dev }, webpack) => {
config = razzleHeroku(config, { target, dev }, webpack);
// do something to config
return config;
}
};
...
<head>
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta charSet="utf-8" />
<title>Welcome to the Afterparty</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
{helmet.title.toComponent()}
{helmet.meta.toComponent()}
{helmet.link.toComponent()}
<style dangerouslySetInnerHTML={{ __html: `
import express from 'express';
import { render } from '@jaredpalmer/after';
import routes from './routes';
import Document from "./Document"
const assets = require(process.env.RAZZLE_ASSETS_MANIFEST);
const server = express();
server
.disable('x-powered-by')
// ./src/Document.js
import React from 'react';
import { ServerStyleSheet } from 'styled-components'
import { AfterRoot, AfterData } from '@jaredpalmer/after';
export default class Document extends React.Component {
static async getInitialProps({ assets, data, renderPage }) {
const sheet = new ServerStyleSheet()
const page = await renderPage(App => props => sheet.collectStyles(<App {...props} />))
const styleTags = sheet.getStyleElement()
render() {
const { isLoading, token } = this.state;
if (!isLoading) {
if (!token) {
return (
<Login screenProps={{ logIn: this.logIn }} />
);
} else {
return (