From 20fd3df3e07877df9cb39c6a81e50c134dd9f836 Mon Sep 17 00:00:00 2001 From: jsun969 Date: Sun, 18 Feb 2024 19:02:03 +1030 Subject: [PATCH] fix(header): payment api check pause condition --- src/components/Header.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 8624fa5c..cc69b2a0 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -27,13 +27,9 @@ export default function Header() { isPaused: () => clerkUser.isLoaded && !clerkUser.isSignedIn, }); - const checkUserPaid = useSWR<{ paid: boolean }>( - ['verify-membership-payment'], - fetcher.get.query, - { - isPaused: () => clerkUser.isLoaded && clerkUser.isSignedIn, - } - ); + const checkUserPaid = useSWR<{ paid: boolean }>(['payment'], fetcher.get.query, { + isPaused: () => clerkUser.isLoaded && !clerkUser.isSignedIn, + }); const [isScrolled, setIsScrolled] = useState(false); useMount(() => {