jqn -r markdown-table 'map(x => "## " + x.name + "\n\n" + markdownTable(x.columns.map(y => [y.name, y.type])) ) | join("\n\n")' < /tmp/stripe.json
id | varchar |
---|---|
business_name | varchar |
business_url | varchar |
// Types for the result object with discriminated union | |
type Success<T> = { | |
data: T; | |
error: null; | |
}; | |
type Failure<E> = { | |
data: null; | |
error: E; | |
}; |
"use client"; | |
import React, { useEffect, useId, useState } from "react"; | |
import { motion, AnimatePresence, MotionConfig } from "framer-motion"; | |
import { PlusIcon, XIcon } from "lucide-react"; | |
import { createPortal } from "react-dom"; | |
import { cn } from "@/lib/utils"; | |
import { buttonVariants } from "../button"; | |
const transition = { |
import { useCallback, useEffect, useState } from "react"; | |
interface DeviceOrientationState { | |
alpha: number | null; | |
beta: number | null; | |
gamma: number | null; | |
absolute: boolean; | |
} | |
// Define an extended interface for DeviceOrientationEvent including requestPermission |
import { useCallback, useEffect, useRef, useState } from "react"; | |
interface UseBroadcastChannelOptions { | |
name: string; | |
onMessage?: (event: MessageEvent) => void; | |
onMessageError?: (event: MessageEvent) => void; | |
} | |
interface UseBroadcastChannelReturn<D, P> { | |
isSupported: boolean; |
import { useEffect, useState } from "react"; | |
import resolveConfig from "tailwindcss/resolveConfig"; | |
// Update the path to your Tailwind config file | |
import tailwindConfig from "tailwind.config"; | |
const useTailwindBreakpoint = ({ | |
onBreakpointChange, | |
}: { | |
// eslint-disable-next-line no-unused-vars |
import { useCallback, useEffect, useRef, useState } from "react"; | |
interface UseUndoHook<T> { | |
value: T; | |
onChange: (newValue: T) => void; | |
undo: () => void; | |
redo: () => void; | |
clear: () => void; | |
canUndo: boolean; | |
canRedo: boolean; |
import { useCallback, useEffect, useState } from "react"; | |
type FetchState<T> = { | |
data: T | null; | |
isLoading: boolean; | |
error: Error | null; | |
isCached: boolean; | |
refetch: () => void; | |
}; |
import { useState, useCallback, useEffect } from 'react' | |
const customEvent = 'myMagicalStorageHook' | |
export default function useLocalStorage( | |
key, | |
initialValue, | |
lifeSpan = Infinity | |
) { | |
const [storedValue, setStoredValue] = useState(() => { |
// In some page_object.ts | |
// For this scenario, we have a Cypress test that triggers a download email to be sent to the user's inbox after performing | |
// some UI steps on the page i.e. clicking a button on the page to export data to a CSV for us to download | |
// We need to follow the download link in the email back to the web app we own and control to continue the test | |
redirectToCSVDownloadPageFromEmail({ | |
user, | |
pass, | |
searchString, | |
}: { | |
user: string; |