Skip to content

Instantly share code, notes, and snippets.

View clovisdasilvaneto's full-sized avatar
👋
Hey hey, nice to "git-meet" you

Clóvis Neto clovisdasilvaneto

👋
Hey hey, nice to "git-meet" you
View GitHub Profile
const myObject = {
nevinha: "a",
u: "2"
}
const form = new FormData()
Object.keys(myObject).forEach(key => {
form.append(key, myObject[key])
})
/* eslint-disable no-useless-escape */
import { FormACWrapper } from "./styled";
import { useState } from "react";
import { SubmitHandler, useForm } from "react-hook-form";
import Typography from "../Typography";
import Button from "../Button";
type Inputs = {
email: string;
phone: string;
/* eslint-disable no-useless-escape */
import { FormACWrapper } from "./styled";
import { useState } from "react";
import { SubmitHandler, useForm } from "react-hook-form";
import Typography from "../Typography";
import Button from "../Button";
type Inputs = {
email: string;
phone: string;
async function* iteratableGuards(validators) {
let currentValidator = 0
let previousResult = null
while (currentValidator < validators.length) {
previousResult = yield await validators[currentValidator](previousResult)
currentValidator++
}
}
export const withCookies = (handler) => {
return async ({ req, ...ctx }) => {
const cookies = req?.headers?.cookies || null
try {
const SSRHandlerData = await handler({req, ...ctx})
return {
...SSRHandlerData,
import React, { useCallback, useState } from "react";
import { adopt } from "react-adopt";
import Input from "@components/common/Form/Input";
import Button from "@components/common/Form/Button";
import {
SubscribeStyles,
SubscribeContainer,
SubiscribeTitle,
SubiscribeDetails,
getSearchParameters() {
var prmstr = window.location.search.substr(1);
return prmstr != null && prmstr != "" ? this.transformToAssocArray(prmstr) : {};
}
transformToAssocArray( prmstr ) {
var params = {};
var prmarr = prmstr.split("&");
for ( var i = 0; i < prmarr.length; i++) {
var tmparr = prmarr[i].split("=");
module.exports = [
'junk food',
'nightclub',
'milkshake',
'fast food',
'french fries',
'burguer',
'cigarret',
'tobacco',
'cigar',
@clovisdasilvaneto
clovisdasilvaneto / react-stateless-component-template.js
Created December 31, 2017 19:14 — forked from jim-at-jibba/react-stateless-component-template.js
React Stateless Component Webstorm/PHPStorm File Template
import React, { PropTypes } from 'react';
const $NAME = (props) => {
return (
$END
);
}
$NAME .propTypes = {
// myProp: PropTypes.string.isRequired
module.exports = {
entry: [path+'carrosel.js', path+'navigation.js', path+'authentication.js', path+'search.js', path+'theme.js',
path+'scroll-navigate.js', portletsPath+'my-systems.js'],
output: {
path: './src/js/libs',
filename: 'bundle.js'
},
devServer: {
inline: true,