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
const entries = document.querySelector(".entries") | |
const allGames = entries.children | |
function getGoodNodeIndex() { | |
const allGamesArr = Array.from(allGames) | |
const goodPosition = allGamesArr.findIndex((item) => { | |
return item.className === 'good' | |
}) | |
return goodPosition |
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
const getMatchsBetween = (Arr1, Arr2, propertyToCompare) => { | |
const matchesFound = Arr2.filter((Arr2Item => { | |
const found = Arr1.find(Arr2Item => { | |
return Arr2Item === dia[propertyToCompare] | |
}) | |
return found !== undefined | |
})) | |
console.log('------------------------------------'); | |
console.log(matchesFound); | |
console.log('------------------------------------'); |
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
server.put('/auth/v1/alterar-senha', async (req, res) => { | |
console.log('TOKEN from server: ', req.cookies.access_token) | |
const response = await fetch('yourputurl.com', { | |
method: 'PUT', | |
headers: { | |
token: req.cookies.access_token, | |
authorization: 'Basic Q3asdasdasdbGllbnQ6ZW9CWDYxaWcasdasVaRHpH', | |
'content-type': 'application/json' | |
}, | |
body: JSON.stringify({ nova: 'oldpass', antiga: 'newpass' }) |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"plugins": [ | |
{ | |
"name": "typescript-styled-plugin" | |
} | |
], | |
"baseUrl": "./", | |
"paths": { | |
"app/*": ["src/*"] |
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 { createSelector } from 'reselect'; | |
import moment from 'moment'; | |
export const orderListByDate = createSelector(state => { | |
return state.sort((a,b) => { | |
return moment.utc(b.startDate).diff(a.startDate); | |
}) | |
}, | |
// the final paramenter in the createSelector | |
// function must be a function that accepts as arguments |
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.HotDeals.slider > div > div > div:first-child , div.HotDeals.slider > div > div > div:nth-child(3), div.HotDeals.slider > div > div > div > div > div > div { | |
background-color: orange !important; | |
} | |
span.HotDeals.cashback-value { | |
background-color: orange; | |
color:white; | |
padding: 10px 15px; | |
} | |
span.HotDeals.cashback-arrow-up { | |
width: 0; |
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 Portal from '../templates/portal/Portal'; | |
import LoadingContainer from '../shared/Loading'; | |
import '../../theme/css/material-design-iconic-font.css'; | |
import '../../theme/js/functions.js'; | |
import '../../theme/css/styles.css'; | |
import HotDealsListContainer from './HotDealsListContainer'; | |
import HotDealsEditContainer from './HotDealsEditContainer'; | |
import PropTypes from 'prop-types'; |
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 { Card, CardActions, CardHeader, CardText } from 'material-ui/Card'; | |
import { SmileUp, SmileDown } from '../shared/svgIcons/icons'; | |
import { PieChart, Pie, Sector, Cell } from 'recharts'; | |
import Loading from './Loading' | |
import './QuestionContainer.css' | |
const data = [{ name: 'Group A', value: 400 }, { name: 'Group B', value: 800 }]; | |
const COLORS = ['#F44336', '#0088FE']; |
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 { View, StyleSheet, Text, Picker } from 'react-native'; | |
class RenderPicker extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
value: 'Selecione' | |
} | |
} |
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
// Stateless component to use inside the form | |
const RenderField = ({ | |
input, | |
placeholder, | |
type, | |
meta: { touched, error } | |
}) => { | |
return ( | |
<div style={{ width: '100%' }}> | |
{touched && error ? |
NewerOlder