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 pg from "pg"; | |
import databaseCredentials from "./databaseCredentials.mjs"; | |
const createDatabase = async () => { | |
const dbConfig = databaseCredentials; | |
const databaseName = dbConfig.database; | |
delete dbConfig.database; |
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 htmlData = [ | |
{ | |
type: "span", | |
value: "one" | |
}, | |
{ | |
type: "div", | |
value: { | |
type: "p", | |
value: "two" |
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, { useCallback } from "react"; | |
import { Text, View, TouchableOpacity, StyleSheet } from "react-native"; | |
import useNavigationHook from "../hooks/useNavigationHook"; | |
const FloatBtn = () => { | |
const navigation = useNavigationHook(); | |
const openHire = useCallback(() => navigation.navigate("Hire"), []); | |
return ( | |
<View style={styles.container}> | |
<TouchableOpacity onPress={openHire} style={styles.btn}> |
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 { store } from "../store"; | |
import { Alert, Platform } from "react-native"; | |
import { createJob, updateJobImage } from "../api/remote_jobs"; | |
import * as RootNavigation from "../navigation/RootNavigation.js"; | |
import checkFileSafely from "./checkFileSafely"; | |
const unlockContent = async ({ | |
setSize, | |
mutate, | |
receipt, |
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 { useState } from "react"; | |
import Header from "../components/Header"; | |
import Container from "../components/Container"; | |
import Row from "../components/Row"; | |
import Filler from "../components/Filler"; | |
import useSWR from "swr"; | |
import { getTasks } from "../api/tasks"; | |
import TaskPage from "../components/TaskPage"; | |
import Button from "../components/Button"; |
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
// LinkComponent.js | |
import React from "react"; | |
import { View, Platform, TouchableOpacity } from "react-native"; | |
let Link = null; | |
if (Platform.OS === "web") { | |
Link = require('next/link').default; | |
} | |
const LinkComponent = (props) => { |
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
// purchaseTile.expo.js | |
const purchaseTile = async () => { | |
console.log('In-App purchases is not available') | |
}; | |
export default purchaseTile; |
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
// purchaseTile.js | |
import { getProductsAsync, purchaseItemAsync, IAPResponseCode } from "expo-in-app-purchases"; | |
const purchaseTile = async () => { | |
const productId = 'post_job'; | |
const items = Platform.select({ | |
ios: [productId], | |
android: [productId], | |
}); |
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, { useState } from "react"; | |
import axios from "axios"; | |
const Form = () => { | |
const [inputValue, setInputValue] = useState(""); | |
return ( | |
<div> | |
<input value={inputValue} onChange={e => setInputValue(e.target.value)} /> | |
<p>{inputValue}</p> | |
<button |
NewerOlder