Skip to content

Instantly share code, notes, and snippets.

View tomassabol's full-sized avatar

Tomáš Sabol tomassabol

View GitHub Profile
/**
* Check that result of Promise.allSettled is fulfilled
*/
export function isFulfilled<T>(
promiseSettledResult: PromiseSettledResult<T>,
): promiseSettledResult is PromiseFulfilledResult<T> {
return promiseSettledResult.status === "fulfilled"
}
@tomassabol
tomassabol / Pagination.tsx
Created July 14, 2024 16:25
Problem with Suspense
"use client";
...
export function Pagination<T>({
results,
startKey,
limit,
}: {
results: T[];