peer-at-code-web/ui/SWRFallback.tsx
2023-09-04 13:39:18 +02:00

15 lines
287 B
TypeScript

'use client';
import { SWRConfig } from 'swr';
export default function SWRFallback({
children,
fallback
}: {
children: React.ReactNode;
fallback: {
[key: string]: unknown;
};
}) {
return <SWRConfig value={{ fallback, keepPreviousData: true }}>{children}</SWRConfig>;
}