mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-06 05:36:02 +02:00
Update
This commit is contained in:
parent
4c61e70506
commit
a6145cb581
1 changed files with 50 additions and 3 deletions
|
@ -6,6 +6,7 @@ import {
|
||||||
BarChart2Icon,
|
BarChart2Icon,
|
||||||
BookIcon,
|
BookIcon,
|
||||||
CalendarIcon,
|
CalendarIcon,
|
||||||
|
CalendarPlusIcon,
|
||||||
PlusIcon,
|
PlusIcon,
|
||||||
TableIcon,
|
TableIcon,
|
||||||
UserIcon,
|
UserIcon,
|
||||||
|
@ -13,6 +14,12 @@ import {
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
import { CreateButton } from "@/app/[locale]/(admin)/create-button";
|
import { CreateButton } from "@/app/[locale]/(admin)/create-button";
|
||||||
|
import {
|
||||||
|
EmptyState,
|
||||||
|
EmptyStateDescription,
|
||||||
|
EmptyStateIcon,
|
||||||
|
EmptyStateTitle,
|
||||||
|
} from "@/app/components/empty-state";
|
||||||
import { GridCard, GridCardHeader } from "@/components/grid-card";
|
import { GridCard, GridCardHeader } from "@/components/grid-card";
|
||||||
import { GroupPollCard } from "@/components/group-poll-card";
|
import { GroupPollCard } from "@/components/group-poll-card";
|
||||||
import { Subheading } from "@/components/heading";
|
import { Subheading } from "@/components/heading";
|
||||||
|
@ -94,6 +101,32 @@ function PendingPolls() {
|
||||||
suspense: true,
|
suspense: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!data) {
|
||||||
|
return <Spinner />;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.length === 0) {
|
||||||
|
return (
|
||||||
|
<EmptyState className="h-96 rounded-lg">
|
||||||
|
<EmptyStateIcon>
|
||||||
|
<CalendarPlusIcon />
|
||||||
|
</EmptyStateIcon>
|
||||||
|
<EmptyStateTitle>
|
||||||
|
<Trans
|
||||||
|
i18nKey="pendingPollsEmptyStateTitle"
|
||||||
|
defaults="No Pending Polls"
|
||||||
|
/>
|
||||||
|
</EmptyStateTitle>
|
||||||
|
<EmptyStateDescription>
|
||||||
|
<Trans
|
||||||
|
i18nKey="pendingPollsEmptyStateDescription"
|
||||||
|
defaults="When you create polls, they will appear here."
|
||||||
|
/>
|
||||||
|
</EmptyStateDescription>
|
||||||
|
</EmptyState>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="grid gap-2 md:grid-cols-3">
|
<div className="grid gap-2 md:grid-cols-3">
|
||||||
{data.map((poll) => {
|
{data.map((poll) => {
|
||||||
|
@ -128,9 +161,23 @@ function UpcomingEvents() {
|
||||||
|
|
||||||
if (data.length === 0) {
|
if (data.length === 0) {
|
||||||
return (
|
return (
|
||||||
<div className="text-muted-foreground">
|
<EmptyState className="h-96 rounded-lg">
|
||||||
<Trans i18nKey="noUpcomingEvents" defaults="No upcoming events" />
|
<EmptyStateIcon>
|
||||||
</div>
|
<CalendarPlusIcon />
|
||||||
|
</EmptyStateIcon>
|
||||||
|
<EmptyStateTitle>
|
||||||
|
<Trans
|
||||||
|
i18nKey="upcomingEventsEmptyStateTitle"
|
||||||
|
defaults="No Upcoming Events"
|
||||||
|
/>
|
||||||
|
</EmptyStateTitle>
|
||||||
|
<EmptyStateDescription>
|
||||||
|
<Trans
|
||||||
|
i18nKey="upcomingEventsEmptyStateDescription"
|
||||||
|
defaults="When you schedule events, they will appear here."
|
||||||
|
/>
|
||||||
|
</EmptyStateDescription>
|
||||||
|
</EmptyState>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue