Skip to content

Commit

Permalink
add message for blank tab content
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangoMan committed Aug 29, 2024
1 parent 08ccbbe commit 6c4a3d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/nextjs/app/admin/_components/SubmissionEligible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ export const SubmissionEligible = ({ submission }: { submission: Submission }) =
buttonLabel = "Eligible";
}

console.log("submission", submission.eligible);

return (
<details className="dropdown dropdown-end">
<summary
Expand Down
10 changes: 10 additions & 0 deletions packages/nextjs/app/admin/_components/SubmissionTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ export const SubmissionTabs = ({ submissions }: { submissions: Submission[] }) =
return <SubmissionCard key={submission.id} submission={submission} />;
})
)}
{notVoted.length === 0 && (
<div role="alert" className="alert col-span-2">
<span>There are no submissions to vote on.</span>
</div>
)}
</div>
</div>

Expand All @@ -67,6 +72,11 @@ export const SubmissionTabs = ({ submissions }: { submissions: Submission[] }) =
/>
<div role="tabpanel" className="tab-content py-6">
<div className="grid gap-6 md:grid-cols-2 xl:grid-cols-3">
{voted.length === 0 && (
<div role="alert" className="alert col-span-2">
<span>You have not voted on any submissions yet.</span>
</div>
)}
{voted.map(submission => {
return <SubmissionCard key={submission.id} submission={submission} />;
})}
Expand Down

0 comments on commit 6c4a3d3

Please sign in to comment.