Skip to content

Commit

Permalink
fix(header): payment api check pause condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jsun969 committed Feb 18, 2024
1 parent 1dbdfac commit 20fd3df
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit 20fd3df

Please sign in to comment.