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
<script> | |
//enable the JavaScript API for an embedded player | |
for (var e = document.getElementsByTagName("iframe"), x = e.length; x--;) | |
if (/youtube.com\/embed/.test(e[x].src)) | |
if(e[x].src.indexOf('enablejsapi=') === -1) | |
e[x].src += (e[x].src.indexOf('?') ===-1 ? '?':'&') + 'enablejsapi=1'; | |
var gtmYTListeners = []; // support multiple players on the same page | |
// attach our YT listener once the API is loaded | |
function onYouTubeIframeAPIReady() { |
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
<script> | |
//enable the JavaScript API for an embedded player | |
for (var e = document.getElementsByTagName("iframe"), x = e.length; x--;) | |
if (/youtube.com\/embed/.test(e[x].src)) | |
if(e[x].src.indexOf('enablejsapi=') === -1) | |
e[x].src += (e[x].src.indexOf('?') ===-1 ? '?':'&') + 'enablejsapi=1'; | |
var gtmYTListeners = []; // support multiple players on the same page | |
// attach our YT listener once the API is loaded | |
function onYouTubeIframeAPIReady() { |
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
<script> | |
$('#export').on('click', function () { | |
var tableContent = taffyData[0].content; | |
var excelSheetElements = { | |
name: 'My fees', // Name of the sheet (tabs) | |
data: tableContent.map(function (el) { // An array of array containing data (each element is a line) | |
return [el.date, el.label, el.amount] | |
}) | |
}; |
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 { Router } from "next/router"; | |
import { useEffect } from "react"; | |
import ReactGA from "react-ga"; | |
const Analytics: React.FC = () => { | |
useEffect(() => { | |
ReactGA.initialize(process.env.ANALYTICS_ID!); | |
Router.events.on("routeChangeComplete", ReactGA.pageview); | |
// @ts-ignore |
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, { useRef } from "react"; | |
import { ThemeProvider } from "styled-components/native"; | |
import AppNavigator from "@modules/navigation/AppNavigator"; | |
import { theme } from "@modules/ui/theme"; | |
function App() { | |
return ( | |
<ThemeProvider theme={theme}> | |
<AppNavigator /> |
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 { every } from "lodash"; | |
import React, { useEffect, useState } from "react"; | |
interface LoadingProcess { | |
name: string; | |
isReady: boolean; | |
} | |
interface Props { | |
/** |
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 AsyncStorage from "@react-native-community/async-storage"; | |
import to from "await-to-js"; | |
import { useCallback, useEffect, useState } from "react"; | |
enum CountrySelectionStatus { | |
Loading = "LOADING", | |
NotChosen = "NOT_CHOSEN", | |
Skipped = "SKIPPED", | |
} |
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 { Splashscreen } from "@images"; | |
import AppLoader from "@modules/app/AppLoader"; | |
import { LoadingProcess } from "@modules/app/types"; | |
import AppNavigator from "@modules/navigation/AppNavigator"; | |
import { CountrySelectionStatus } from "@modules/onboarding/types"; | |
import _ from "lodash"; | |
import React from "react"; | |
import styled from "styled-components/native"; | |
import { useFavoriteCountry } from "@modules/app/hooks/useFavoriteCountry"; |
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
/** | |
* Crawl through navigation state to get route metadata. | |
* | |
* @param {*} navigationState | |
* @returns {*} | |
*/ | |
export function getActiveRouteMetadata(navigationState) { | |
if (!navigationState) { | |
return null; | |
} |
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
const chalk = require("chalk").default; | |
// Fail after time | |
function ApiError(time, theme) { | |
return new Promise((_, reject) => { | |
setTimeout(() => { | |
reject("=> API call " + chalk.red("failed") + " with [" + chalk.blue(theme) + "] at " + time); | |
}, time); | |
}); | |
} |
OlderNewer