This file contains 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 { 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) |
This file contains 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 PropTypes from 'prop-types'; | |
import { Constants } from 'expo'; | |
import { WebView } from 'react-native'; | |
import { CONEKTA_KEY } from 'react-native-dotenv'; | |
class Conekta extends Component { | |
deviceId = Constants.deviceId.replace(/-/g, ''); | |
tokenizeCard = card => |
This file contains 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
function string_to_slug (str) { | |
str = str.replace(/^\s+|\s+$/g, ''); // trim | |
str = str.toLowerCase(); | |
// remove accents, swap ñ for n, etc | |
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;"; | |
var to = "aaaaeeeeiiiioooouuuunc------"; | |
for (var i=0, l=from.length ; i<l ; i++) { | |
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); | |
} |