mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-08 03:57:30 +02:00
Update
This commit is contained in:
parent
211e261c71
commit
8e778a40ec
9 changed files with 35 additions and 49 deletions
|
@ -241,10 +241,8 @@
|
|||
"verificationCodeSentTo": "We sent a verification code to <b>{email}</b>",
|
||||
"home": "Home",
|
||||
"groupPoll": "Group Poll",
|
||||
"create": "Create",
|
||||
"upcoming": "Upcoming",
|
||||
"past": "Past",
|
||||
"copyLink": "Copy Link",
|
||||
"upcomingEventsEmptyStateTitle": "No Upcoming Events",
|
||||
"upcomingEventsEmptyStateDescription": "When you schedule events, they will appear here.",
|
||||
"pastEventsEmptyStateTitle": "No Past Events",
|
||||
|
@ -281,5 +279,6 @@
|
|||
"subscribe": "Subscribe",
|
||||
"cancelAnytime": "Cancel anytime from your <a>billing page</a>.",
|
||||
"copiedToClipboard": "Copied to clipboard",
|
||||
"viewAll": "View All"
|
||||
"viewAll": "View All",
|
||||
"pending": "Pending"
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
import { CalendarIcon } from "lucide-react";
|
||||
|
||||
import { UserScheduledEvents } from "@/app/[locale]/(admin)/events/user-scheduled-events";
|
||||
import { Params } from "@/app/[locale]/types";
|
||||
import {
|
||||
PageContainer,
|
||||
PageContent,
|
||||
PageHeader,
|
||||
PageIcon,
|
||||
PageTitle,
|
||||
} from "@/app/components/page-layout";
|
||||
import { getTranslation } from "@/app/i18n";
|
||||
|
@ -13,13 +16,14 @@ export default async function Page({ params }: { params: Params }) {
|
|||
return (
|
||||
<PageContainer>
|
||||
<PageHeader>
|
||||
<div className="flex items-center gap-x-3">
|
||||
<PageTitle>
|
||||
{t("events", {
|
||||
defaultValue: "Events",
|
||||
})}
|
||||
</PageTitle>
|
||||
</div>
|
||||
<PageIcon>
|
||||
<CalendarIcon />
|
||||
</PageIcon>
|
||||
<PageTitle>
|
||||
{t("events", {
|
||||
defaultValue: "Events",
|
||||
})}
|
||||
</PageTitle>
|
||||
</PageHeader>
|
||||
<PageContent>
|
||||
<UserScheduledEvents />
|
||||
|
|
|
@ -7,6 +7,7 @@ import {
|
|||
PageContainer,
|
||||
PageContent,
|
||||
PageHeader,
|
||||
PageIcon,
|
||||
PageTitle,
|
||||
} from "@/app/components/page-layout";
|
||||
import { getTranslation } from "@/app/i18n";
|
||||
|
@ -17,6 +18,9 @@ export default async function Page({ params }: { params: Params }) {
|
|||
<div>
|
||||
<PageContainer>
|
||||
<PageHeader>
|
||||
<PageIcon>
|
||||
<HomeIcon />
|
||||
</PageIcon>
|
||||
<PageTitle>
|
||||
<Trans t={t} i18nKey="home" defaults="Home" />
|
||||
</PageTitle>
|
||||
|
@ -28,16 +32,3 @@ export default async function Page({ params }: { params: Params }) {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: { locale: string };
|
||||
}) {
|
||||
const { t } = await getTranslation(params.locale);
|
||||
return {
|
||||
title: t("home", {
|
||||
defaultValue: "Home",
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -21,16 +21,14 @@ export default async function Page({
|
|||
return (
|
||||
<PageContainer>
|
||||
<PageHeader>
|
||||
<div className="flex items-center gap-x-3">
|
||||
<PageIcon>
|
||||
<BarChart2Icon />
|
||||
</PageIcon>
|
||||
<PageTitle>
|
||||
{t("polls", {
|
||||
defaultValue: "Polls",
|
||||
})}
|
||||
</PageTitle>
|
||||
</div>
|
||||
<PageIcon>
|
||||
<BarChart2Icon />
|
||||
</PageIcon>
|
||||
<PageTitle>
|
||||
{t("polls", {
|
||||
defaultValue: "Polls",
|
||||
})}
|
||||
</PageTitle>
|
||||
</PageHeader>
|
||||
<PageContent>
|
||||
<UserPolls />
|
||||
|
|
|
@ -68,8 +68,8 @@ function FilteredPolls({ status }: { status: PollStatus }) {
|
|||
status={poll.status}
|
||||
inviteLink={`${window.location.origin}/invite/${poll.id}`}
|
||||
responseCount={poll.participants.length}
|
||||
dateStart={poll.createdAt}
|
||||
dateEnd={poll.createdAt}
|
||||
dateStart={poll.dateRange.start}
|
||||
dateEnd={poll.dateRange.end}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
|
|
@ -64,9 +64,9 @@ export function Sidebar() {
|
|||
const posthog = usePostHog();
|
||||
return (
|
||||
<nav className="flex flex-1 flex-col ">
|
||||
<ul role="list" className="flex flex-1 flex-col gap-y-7">
|
||||
<ul role="list" className="flex flex-1 flex-col gap-y-8">
|
||||
<li>
|
||||
<ul role="list" className="-mx-2 space-y-1">
|
||||
<ul role="list" className="-mx-2 space-y-2">
|
||||
<li>
|
||||
<NavItem current={pathname === "/"} href="/" icon={HomeIcon}>
|
||||
<Trans i18nKey="home" defaults="Home" />
|
||||
|
|
|
@ -19,7 +19,7 @@ export function PageIcon({
|
|||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<div className={cn("hidden", className)}>
|
||||
<div className={cn("hidden rounded-md border bg-gray-50 p-2", className)}>
|
||||
<Slot className="size-4">{children}</Slot>
|
||||
</div>
|
||||
);
|
||||
|
@ -43,7 +43,9 @@ export function PageHeader({
|
|||
className?: string;
|
||||
variant?: "default" | "ghost";
|
||||
}) {
|
||||
return <div className={cn(className)}>{children}</div>;
|
||||
return (
|
||||
<div className={cn("flex items-center gap-x-4", className)}>{children}</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function PageSection({ children }: { children?: React.ReactNode }) {
|
||||
|
|
|
@ -24,14 +24,6 @@ export function Subheading({
|
|||
className,
|
||||
}: React.PropsWithChildren<{ className?: string }>) {
|
||||
return (
|
||||
<h2
|
||||
className={cn(
|
||||
"text-base font-semibold text-gray-900",
|
||||
heading.className,
|
||||
className,
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</h2>
|
||||
<h2 className={cn("text-base font-semibold", className)}>{children}</h2>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import { cn } from "./lib/utils";
|
|||
|
||||
const buttonVariants = cva(
|
||||
cn(
|
||||
"inline-flex border font-medium disabled:pointer-events-none select-none disabled:opacity-50 items-center justify-center whitespace-nowrap border",
|
||||
"inline-flex border transition-colors font-medium disabled:pointer-events-none select-none disabled:opacity-50 items-center justify-center whitespace-nowrap border",
|
||||
"focus-visible:ring-offset-input-background",
|
||||
"focus:shadow-none",
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue