Skip to content

Commit

Permalink
give isLoading priority over !session
Browse files Browse the repository at this point in the history
  • Loading branch information
zeucapua committed Oct 3, 2024
1 parent a9fd036 commit 1de38c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/explore/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ function RecommendationSection({
revalidateOnFocus: false,
});

if (!session) {
if (isLoading) {
return <Spinner />;
} else if (!session) {
return (
<Button variant="primary" onClick={loginOnClick} className="w-fit">
Connect with GitHub
</Button>
);
} else if (isLoading) {
return <Spinner />;
} else if (isError) {
return <Text type="danger">There has been an error. Try reloading the page!</Text>;
} else if (user && !user.interests) {
Expand Down

0 comments on commit 1de38c7

Please sign in to comment.