Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
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
| // Types for the result object with discriminated union | |
| type Success<T> = { | |
| data: T; | |
| error: null; | |
| }; | |
| type Failure<E> = { | |
| data: null; | |
| error: E; | |
| }; |
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
| { | |
| "explorer.fileNesting.enabled": true, | |
| "explorer.fileNesting.patterns": { | |
| "package.json": ".eslint*, prettier*, tsconfig*, vite*, pnpm-lock*, bun.lockb, nest*", | |
| "tailwind.config.js": "tailwind.config*, postcss.config*", | |
| ".env.local": ".env*", | |
| ".env": ".env*" | |
| } | |
| } |
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
| "use client" | |
| import * as React from "react" | |
| import { buttonVariants } from "@/components/ui/button" | |
| import { ScrollArea } from "@/components/ui/scroll-area" | |
| import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" | |
| import { cn } from "@/lib/utils" | |
| import { ChevronLeft, ChevronRight } from "lucide-react" | |
| import { DayPicker, DropdownProps } from "react-day-picker" |
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 { getAuth, withClerkMiddleware } from "@clerk/nextjs/server"; | |
| import { NextResponse, NextFetchEvent } from "next/server"; | |
| import type { NextRequest } from "next/server"; | |
| import { Ratelimit } from "@upstash/ratelimit"; | |
| import { Redis } from "@upstash/redis"; | |
| // Add public paths for Clerk to handle. | |
| const publicPaths = ["/", "/sign-in*", "/sign-up*", "/api/blocked"]; | |
| // set your rate limit. |
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
| export function mergeRefs(refs) { | |
| return (value) => { | |
| refs.forEach((ref) => { | |
| if (typeof ref === "function") { | |
| ref(value); | |
| } else if (ref != null) { | |
| ref.current = value; | |
| } | |
| }); | |
| }; |