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 { useNavigation } from "@react-navigation/native"; | |
import { useEffect, useState } from "react"; | |
import { Modal, View, Text, Button, Platform, Linking, Alert } from "react-native"; | |
import { useTranslation } from "react-i18next"; | |
import VersionCheck from "react-native-version-check"; | |
export function useCheckAppVersion() { | |
const [showModal, setShowModal] = useState(false); | |
const [latestVersion, setLatestVersion] = useState(""); |
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
<!DOCTYPE html> | |
<html lang="pt-BR"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Diário do Aventureiro - Registro de Missões</title> | |
<link href="https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=MedievalSharp&display=swap" | |
rel="stylesheet"> | |
<style> |
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, { memo, useCallback, useState } from 'react'; | |
import { FlatList, Text, Button, View, StyleSheet, Pressable } from 'react-native'; | |
// Interface para os dados de cada item da lista | |
interface ItemData { | |
id: string; | |
selected: boolean; // Indica se o item está selecionado | |
} | |
// Interface para as propriedades do componente Item |
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 { onCall, CallableRequest, HttpsError } from "firebase-functions/v2/https"; | |
import * as logger from "firebase-functions/logger"; | |
import * as admin from "firebase-admin"; | |
admin.initializeApp(); | |
export const getMetalcodeAccessToken = onCall(async (request: CallableRequest<unknown>) => { | |
// Acesse o token via process.env | |
const accessToken = process.env.METALCODEAPI_ACCESS_TOKEN; |
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 { StatusBar } from 'expo-status-bar'; | |
import { StyleSheet, Text, View } from 'react-native'; | |
import { useEffect, useState } from 'react'; | |
import functions from '@react-native-firebase/functions'; | |
export default function App() { | |
const [token, setToken] = useState<string | null>(null); | |
const [error, setError] = useState<string | null>(null); | |
useEffect(() => { |