chore: dashboard empty state improvement

This commit is contained in:
Anmol Singh Bhatia 2024-01-25 14:14:43 +05:30
parent a18d77dd69
commit 0954db0fcb

View File

@ -55,17 +55,19 @@ export const WorkspaceDashboardView = observer(() => {
return ( return (
<> <>
{homeDashboardId && joinedProjectIds ? (
<>
{joinedProjectIds.length > 0 ? (
<div className="space-y-7 p-7 bg-custom-background-90 h-full w-full flex flex-col overflow-y-auto">
<IssuePeekOverview /> <IssuePeekOverview />
{currentUser && <UserGreetingsView user={currentUser} />}
{currentUser && !currentUser.is_tour_completed && ( {currentUser && !currentUser.is_tour_completed && (
<div className="fixed left-0 top-0 z-20 grid h-full w-full place-items-center bg-custom-backdrop bg-opacity-50 transition-opacity"> <div className="fixed left-0 top-0 z-20 grid h-full w-full place-items-center bg-custom-backdrop bg-opacity-50 transition-opacity">
<TourRoot onComplete={handleTourCompleted} /> <TourRoot onComplete={handleTourCompleted} />
</div> </div>
)} )}
{homeDashboardId && joinedProjectIds ? (
<div className="space-y-7 p-7 bg-custom-background-90 h-full w-full flex flex-col overflow-y-auto">
{currentUser && <UserGreetingsView user={currentUser} />}
{joinedProjectIds.length > 0 ? (
<DashboardWidgets /> <DashboardWidgets />
</div>
) : ( ) : (
<EmptyState <EmptyState
image={emptyStateImage} image={emptyStateImage}
@ -85,7 +87,7 @@ export const WorkspaceDashboardView = observer(() => {
disabled={!isEditingAllowed} disabled={!isEditingAllowed}
/> />
)} )}
</div> </>
) : ( ) : (
<div className="h-full w-full grid place-items-center"> <div className="h-full w-full grid place-items-center">
<Spinner /> <Spinner />