Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "nextjs-15-social-media-app",
"name": "GoTogether",
"version": "0.1.0",
"private": true,
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export default function Page() {
<main className="flex h-screen items-center justify-center p-5">
<div className="flex h-full max-h-[40rem] w-full max-w-[64rem] overflow-hidden rounded-2xl bg-card shadow-2xl">
<div className="w-full space-y-10 overflow-y-auto p-10 md:w-1/2">
<h1 className="text-center text-3xl font-bold">Login to Hbook</h1>
<h1 className="text-center text-3xl font-bold">
Login to GoTogether
</h1>
<div className="space-y-5">
<GoogleSignInButton />
<div className="flex items-center gap-3">
Expand Down
Binary file modified src/app/favicon.ico
Binary file not shown.
19 changes: 11 additions & 8 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import "./globals.css";
import ReactQueryProvider from "./ReactQueryProvider";

// next-intl imports
import { NextIntlClientProvider } from 'next-intl';
import { getLocale, getMessages } from 'next-intl/server'; // Import getMessages
import { NextIntlClientProvider } from "next-intl";
import { getLocale, getMessages } from "next-intl/server"; // Import getMessages

const geistSans = localFont({
src: "./fonts/GeistVF.woff",
Expand All @@ -23,29 +23,32 @@ const geistMono = localFont({

export const metadata: Metadata = {
title: {
template: "%s | GoTogether",
default: "GoTogether",
template: "%s | GoTogether",
default: "GoTogether",
},
description: "The social media app for powernerds",
description:
"GoTogether is a smart travel planning web app that combines AI-powered itinerary recommendations with social media features. Discover top destinations, collaborate with friends, share your journeys, and get real-time suggestions for hotels, restaurants, and attractions — all in one seamless platform.",
};

export default async function RootLayout({
children,
params, // params.locale is automatically passed by Next.js if route is /app/[locale]/...
// but getLocale() is more general if locale isn't always in path params at this layout level
// but getLocale() is more general if locale isn't always in path params at this layout level
}: Readonly<{
children: React.ReactNode;
params?: { locale?: string };
}>) {
// Use params.locale if available and valid, otherwise fallback to getLocale()
// This handles cases where this RootLayout might be used directly by a locale-specific route segment.
// However, with `localePrefix: 'as-needed'` and middleware, `getLocale()` should be reliable.
const locale = params?.locale || await getLocale();
const locale = params?.locale || (await getLocale());
console.log("RootLayout - Determined locale:", locale); // Added console.log
const messages = await getMessages(); // Uses the locale from getRequestConfig in i18n.ts

return (
<html lang={locale}> {/* Set lang attribute to the current locale */}
<html lang={locale}>
{" "}
{/* Set lang attribute to the current locale */}
<body className={`${geistSans.variable} ${geistMono.variable}`}>
<NextIntlClientProvider
locale={locale}
Expand Down