Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

clerkLoadFailure.ts

11 lines313 Bytes

1import { useClerk } from "@clerk/react";
2​
3export function useClerkLoadFailed() {
4 return useClerk().status === "error";
5}
6​
7export function retryClerkLoad() {
8 // Clerk caches its failed script load for the life of the page and never
9 // retries, so a reload is the only recovery.
10 window.location.reload();