Skip to content

Instantly share code, notes, and snippets.

View raulpesilva's full-sized avatar

Raul Pereira da Silva raulpesilva

  • XP inc
  • Brasil, São Paulo
  • 12:17 (UTC -03:00)
  • X @raulpesilva
View GitHub Profile
import React, { Component } from "react";
import api from "../../services/api";
import "./style.css";
export default class Main extends Component {
state = {
products: [],
productInfo: {},
page: 1
{
"series": [
{
"id": 1,
"nome": "primeiro personagem",
"imgPerfil": "url da imagem de perfil",
"imageSerie": "url da imagem de capa da serie",
"tagPerson": ["as tags", "do personagem", "separadas", "assim"],
"comments": [
{
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
{
const dictionary = "abcdefghijklmnopqrstuvwxyz";
const create = letter => {
[...dictionary].map((letterDict, indexLetter) => {
if (letter.toLowerCase() == letterDict) {
createCascate(indexLetter);
}
});
};
const createCascate = (indexLetter) => {
const dictionary = "abcdefghijklmnopqrstuvwxyz";
const create = letter => {
createCascate(dictionary.indexOf(letter.toLowerCase()) + 1)
};
const createCascate = (indexLetter) => {
const topDiamond = []
for (let index = 0; index < indexLetter; index++) {
const array = [...new Array(indexLetter * 2 + 1)].fill('_');
array[indexLetter + index] = dictionary[index];
// This file was initially generated by Windows Terminal 0.11.1191.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
{
"key": "ctrl+shift+i",
"command": "editor.action.sourceAction",
"args": {
"kind": "source.addMissingImports",
"apply": "first"
}
}
import useSWR from 'swr';
export function useFetch(url) {
const { data, error } = useSWR(url, async (url) => {
const response = await fetch(url);
const dataString = await response.json();
const { data } = await JSON.parse(dataString);
return data;
});