Files
Epicure/apps/web/app/(app)/messages/page.tsx
T
Arnaud 08ab9ac71f i18n: translate meal/drink pairing, nutrition, comments, DMs, people search, URL import
Full sweep of hardcoded English strings across:
- Meal pairing and drink pairing dialogs (titles, descriptions, role/
  type labels, regenerate/generate buttons, progress labels) — also
  fixed drink type labels that had French text hardcoded regardless
  of locale ("Sans alcool"/"Chaud").
- Nutrition panel — had no useTranslations at all.
- Comments: header, empty/loading state, post/reply/cancel/delete
  buttons, relative timestamps (just now/Xm ago/Xh ago/Xd ago), and
  comment-reactions' toasts + aria-labels.
- Rating stars toasts.
- Direct messages: thread, conversation list, message button, both
  /messages pages.
- People search page and component.
- URL import dialog (title, description, buttons, toasts).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 03:20:49 +02:00

28 lines
1.1 KiB
TypeScript

import type { Metadata } from "next";
import { headers } from "next/headers";
import { MessageCircle } from "lucide-react";
import { auth } from "@/lib/auth/server";
import { ConversationsList } from "@/components/social/conversations-list";
import { getMessages } from "@/lib/i18n/server";
export const metadata: Metadata = { title: "Messages — Epicure" };
export default async function MessagesPage() {
const session = await auth.api.getSession({ headers: await headers() });
const m = getMessages((session?.user as { locale?: string } | undefined)?.locale);
return (
<div className="max-w-5xl mx-auto h-[calc(100vh-8rem)] border rounded-xl overflow-hidden flex">
<div className="w-full sm:w-80 border-r shrink-0 overflow-y-auto">
<ConversationsList />
</div>
<div className="hidden sm:flex flex-1 items-center justify-center text-muted-foreground">
<div className="text-center space-y-2">
<MessageCircle className="h-10 w-10 mx-auto opacity-50" />
<p className="text-sm">{m.messages.selectConversation}</p>
</div>
</div>
</div>
);
}