dorsk / banner.tsx
0 likes
0 forks
1 files
Last active
| 1 | import { useCallback, useEffect, useState } from "react"; |
| 2 | |
| 3 | // Check that the Enzuzo script has loaded |
| 4 | // Polling is the only option for global variables that are not part of React |
| 5 | function useEnzuzoLoaded() { |
| 6 | const [isLoaded, setIsLoaded] = useState(false); |
| 7 | |
| 8 | useEffect(() => { |
| 9 | if (isLoaded) return; |
| 10 | const interval = setInterval(() => { |
Newer
Older