Improve reliability by retrying failed imports (#5408)

This commit is contained in:
Tom Moor
2023-06-03 14:17:36 -04:00
committed by GitHub
parent a8a506af3e
commit d18994b14e
10 changed files with 74 additions and 25 deletions

View File

@@ -1,7 +1,8 @@
import { formatDistanceToNow } from "date-fns";
import * as React from "react";
import lazyWithRetry from "~/utils/lazyWithRetry";
const LocaleTime = React.lazy(() => import("~/components/LocaleTime"));
const LocaleTime = lazyWithRetry(() => import("~/components/LocaleTime"));
type Props = React.ComponentProps<typeof LocaleTime> & {
onClick?: () => void;