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 type { NextPage } from "next"; | |
import Head from "next/head"; | |
const CloseIcon = () => ( | |
<svg | |
aria-hidden="true" | |
className="w-5 h-5" | |
fill="currentColor" | |
viewBox="0 0 20 20" |
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
/** | |
* Update: I just use this script to generate the terminal command, then I copy & paste | |
* that command into the terminal and run it manually. | |
* The reason I don't run the command from the script is that it wasn't properly erroring out | |
* from the script. You can uncomment the `exec(` function if you want to execute from | |
* this script though | |
* | |
* This script deploys to Google Cloud Run while also updating environment variables | |
* Note: This will fail if there are any double quotes (") in your environment variables | |
* Also this script won't delete environment variables that've already been pushed |
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 { getRepository, InsertResult } from "typeorm"; | |
/** | |
* Upsert for TypeORM on PostgreSQL | |
* Returns InsertResult object (contains ID) | |
* @param repo Repository | |
* @param {object | object[]} data Data to upsert. Can be object or array | |
* @param {string} primaryKey Name of column that is primary key | |
* @returns {Promise<InsertResult>} | |
*/ |