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
"use client"; | |
import { zodResolver } from "@hookform/resolvers/zod"; | |
import { useForm } from "react-hook-form"; | |
import { z } from "zod"; | |
import emailjs from "@emailjs/browser"; | |
import React, { useRef } from "react"; | |
import { env } from "~/env"; | |
import { Button } from "~/components/ui/button"; | |
import { |
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
type Post = { | |
object: string; | |
id: string; | |
created_time: Date; | |
last_edited_time: Date; | |
created_by: { | |
object: string; | |
id: string; | |
}; | |
last_edited_by: { |
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
let arr = [1,2,3,4,5,6,7] | |
// IF I WANT... | |
// ---- Mutate the original array ---- // | |
// Add to | |
arr.push() // end | |
arr.unshift() //start |
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
// return < 0, A, B (keep order) | |
// return > 0, A, B (switch order) | |
// Note that this will mutate the original array!! | |
// Implement this callback to sort numbers in ASCENDING order | |
arrayName.sort((a, b) => { | |
if (a > b) return 1; | |
if (a < b) return -1; | |
}) |
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
zip -er newZippedFile.zip fileOrFolderToZip |