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
for await (const item of resp.user.edge_owner_to_timeline_media.edges) { | |
var base64 = await Jimp.read(encodeURI(item.node.display_url)).then(image => image.getBase64Async(Jimp.AUTO)).then(base64 => base64); | |
data.push({ | |
id: item.node.id, | |
display_url: base64, | |
shortcode: item.node.shortcode, | |
text: item.node.edge_media_to_caption.edges[0].node.text | |
}) | |
} |
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 handleUploadImage = async (e) => { | |
var images = Array.from(e.target.files); | |
var _files = form.files; | |
images.forEach(async (item) => { | |
var maxW=500; | |
var maxH=500; | |
var _img = new Image(); |
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, { useEffect } from "react"; | |
const GoogleTranslate = (props) => { | |
const googleTranslateElementInit = () => { | |
new window.google.translate.TranslateElement({ pageLanguage: 'pt', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, includedLanguages: 'en,es,pt', autoDisplay: false, multilanguagePage: true }, 'google_translate_element') | |
} | |
useEffect(() => { | |
var addScript = document.createElement('script'); |
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
'use strict' | |
/* eslint-disable */ | |
const withPlugins = require('next-compose-plugins'); | |
const withSass = require('@zeit/next-sass'); | |
const withCSS = require('@zeit/next-css'); | |
const withOffline = require('next-offline'); | |
const withImages = require('next-images'); | |
const path = require('path') |
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
{ | |
"version": 2, | |
"routes": [ | |
{ | |
"src": "^/service-worker.js$", | |
"dest": "static/service-worker.js", | |
"headers": { | |
"Cache-Control": "no-cache,no-store,max-age=0,must-revalidate", | |
"Service-Worker-Allowed": "/", | |
"Pragma": "no-cache", |
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
<html> | |
<head> | |
<title>Dashboard</title> | |
<script src="/socket.io/socket.io.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<script> | |
$(document).ready(function(){ | |
socket = io.connect(); | |