Skip to content

Instantly share code, notes, and snippets.

View Ardian-Hoti's full-sized avatar

ArdianHoti Ardian-Hoti

  • 16:52 (UTC +02:00)
View GitHub Profile
@perfectbase
perfectbase / await.tsx
Last active June 18, 2025 13:18
Await component for tRPC with prefetch
/* eslint-disable @typescript-eslint/no-explicit-any */
import { type TRPCQueryOptions } from '@trpc/tanstack-react-query';
import { unstable_noStore } from 'next/cache';
import { Fragment, Suspense, type ReactNode } from 'react';
import { ErrorBoundary } from 'react-error-boundary';
import { HydrateClient, prefetch as prefetchTRPC } from '@/trpc/server';
type AwaitProps<T> =
| {
promise: Promise<T>;
@dillionverma
dillionverma / lucide-react.d.ts
Last active June 9, 2025 23:09
How to stop @radix-ui, next/router and lucide-react auto-imports
declare module 'lucide-react' {
export * from 'lucide-react/dist/lucide-react.suffixed'
}