Skip to content

Commit

Permalink
DEAR-117: fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
baurnick committed Jul 21, 2024
1 parent 0453821 commit 223a8dc
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions app/(main)/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,32 @@ const Home: React.FC = () => {
if (isLoading) return <Loading />;
if (error) return <Error errorMessage="It seems there was a problem loading your account." action="/" showContact />;

if (user && user.hasTeam) {
return (
<div className="space-y-4">
<div className="flex w-full">
<h1>{user ? `Welcome, ${user?.name}` : 'Welcome'}</h1>
return (
<div>
{user && user.hasTeam ? (
<div className="space-y-4">
<div className="flex w-full">
<h1>{user ? `Welcome, ${user?.name}` : 'Welcome'}</h1>
</div>
<Alert variant="informative">
<Megaphone className="h-4 w-4" />
<AlertTitle>We think you forgot something?</AlertTitle>
<AlertDescription>You have not tracked your Happiness since 2 days.</AlertDescription>
</Alert>
<div className="grid grid-cols-2 gap-10">
<OverallHappiness />
<OverallHappinessWeather />
</div>
<div className="grid grid-cols-2 gap-10">
<WorkItemHappiness />
<Feedback />
</div>
</div>
<Alert variant="informative">
<Megaphone className="h-4 w-4" />
<AlertTitle>We think you forgot something?</AlertTitle>
<AlertDescription>You have not tracked your Happines since 2 days.</AlertDescription>
</Alert>
<div className="grid grid-cols-2 gap-10">
<OverallHappiness />
<OverallHappinessWeather />
</div>
<div className="grid grid-cols-2 gap-10">
<WorkItemHappiness />
<Feedback />
</div>
</div>
);
}
) : (
<Loading />
)}
</div>
);
};

export default Home;

0 comments on commit 223a8dc

Please sign in to comment.