Skip to content

Instantly share code, notes, and snippets.

View kinxori's full-sized avatar
💭
open to work 📫

Gustavo Quiroz kinxori

💭
open to work 📫
View GitHub Profile
@kinxori
kinxori / Random Emoji Generator using React.jsx
Last active May 14, 2023 08:33
Create Random Emoji Generator function. We are using React and fetching from "emoji-api.com". (updates every time your father component has a movement, not fixed yet 🥲)
import { useEffect, useState } from "react"; // Import your React hooks
const [emojiData, setEmojiData] = useState([]); // State variable to store the emoji data
const EmojiAPI = "https://emoji-api.com/emojis?access_key=👺Register to the page and generate your unique key👺"
//👺Atention here
useEffect(() => { // We use useEffect hook to fetch our API everytime our page loads
const fetchEmojiData = async () => {
const response = await fetch(EmojiAPI)
@kinxori
kinxori / Firebase Mailer Function.js
Last active May 14, 2023 08:33
Sending emails via Gmail using React.js and Firebase Functions. (Ignore the typescript)👺
const functions = require("firebase-functions");
const nodemailer = require("nodemailer");
const dotenv = require("dotenv"); // enable enviorment variables
dotenv.config();
const transport = nodemailer.createTransport({ // This is what is going to send your email
service: "Gmail", // We are using gmail here
auth: {
user: "user@example.com", //use your enviorment variables here