Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
29 changes: 0 additions & 29 deletions apps/www/app/[locale]/(app)/(dynamic)/(core)/chat/layout.tsx

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions apps/www/app/[locale]/(app)/(dynamic)/(core)/layout.tsx

This file was deleted.

33 changes: 0 additions & 33 deletions apps/www/app/[locale]/(app)/(dynamic)/layout.tsx

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions apps/www/app/[locale]/(app)/(dynamic)/school/auth/page.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import { api } from "@repo/backend/convex/_generated/api";
import type { Id } from "@repo/backend/convex/_generated/dataModel";
import { fetchQuery } from "convex/nextjs";
import type { Metadata } from "next";
import { setRequestLocale } from "next-intl/server";
import { cache, use } from "react";
import { cache } from "react";
import { AiChatPage } from "@/components/ai/chat-page";
import { getToken } from "@/lib/auth/server";
import { getLocaleOrThrow } from "@/lib/i18n/params";

const getChatTitle = cache(async (id: Id<"chats">) => {
const token = await getToken();
Expand Down Expand Up @@ -41,13 +39,10 @@ export async function generateMetadata({
}
}

export default function Page(props: PageProps<"/[locale]/chat/[id]">) {
const { params } = props;
const { locale: rawLocale, id } = use(params);
const locale = getLocaleOrThrow(rawLocale);

// Enable static rendering
setRequestLocale(locale);
export default async function Page({
params,
}: PageProps<"/[locale]/chat/[id]">) {
const { id } = await params;

return <AiChatPage chatId={id as Id<"chats">} />;
}
15 changes: 15 additions & 0 deletions apps/www/app/[locale]/(app)/(shared)/(main)/(core)/chat/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { ErrorBoundary } from "@repo/design-system/components/ui/error-boundary";
import { AiChatSidebar } from "@/components/ai/chat-sidebar";

export default function Layout(props: LayoutProps<"/[locale]/chat">) {
const { children } = props;
return (
<main className="h-[calc(100svh-4rem)] lg:h-svh">
<div className="flex h-full">
<ErrorBoundary fallback={null}>{children}</ErrorBoundary>

<AiChatSidebar />
</div>
</main>
);
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
import { Particles } from "@repo/design-system/components/ui/particles";
import { setRequestLocale } from "next-intl/server";
import { use } from "react";
import { ChatNew } from "@/components/ai/chat-new";
import { HomeTitle } from "@/components/ai/title";
import { Videos } from "@/components/ai/videos";
import { Weather } from "@/components/ai/weather";
import { getLocaleOrThrow } from "@/lib/i18n/params";

export const revalidate = false;

export default function Page(props: PageProps<"/[locale]/chat">) {
const { params } = props;
const { locale: rawLocale } = use(params);
const locale = getLocaleOrThrow(rawLocale);

// Enable static rendering
setRequestLocale(locale);

export default function Page() {
return (
<div
className="relative flex size-full min-h-[calc(100svh-4rem)] items-center justify-center lg:min-h-svh"
data-pagefind-ignore
>
<div className="relative flex size-full min-h-[calc(100svh-4rem)] items-center justify-center lg:min-h-svh">
<Particles className="pointer-events-none absolute inset-0 opacity-80" />
<div className="mx-auto w-full max-w-xl px-6">
<div className="relative flex h-full flex-col space-y-4">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { use } from "react";
import { EventAccessPage } from "@/components/event/access-page";

export default function Page(
props: PageProps<"/[locale]/event/try-out/[code]">
) {
const { params } = props;
const { code } = use(params);

return <EventAccessPage code={code} />;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BreadcrumbJsonLd } from "@repo/seo/json-ld/breadcrumb";
import { redirect } from "next/navigation";
import { type Locale, useTranslations } from "next-intl";
import { setRequestLocale } from "next-intl/server";

import { Suspense, use } from "react";
import { HomeContinueLearning } from "@/components/home/continue-learning";
import { HomeExplore } from "@/components/home/explore";
Expand All @@ -15,15 +15,10 @@ export default function Page(props: PageProps<"/[locale]">) {
const { locale: rawLocale } = use(params);
const locale = getLocaleOrThrow(rawLocale);

setRequestLocale(locale);

return (
<>
<PageBreadcrumb locale={locale} />
<div
className="relative min-h-[calc(100svh-4rem)] lg:min-h-svh"
data-pagefind-ignore
>
<div className="relative min-h-[calc(100svh-4rem)] lg:min-h-svh">
<Suspense>
<Main searchParams={searchParams} />
</Suspense>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import type { Metadata } from "next";
import { getTranslations, setRequestLocale } from "next-intl/server";
import { Suspense, use } from "react";
import { getTranslations } from "next-intl/server";
import { Suspense } from "react";
import { HomeHeader } from "@/components/home/header";
import { InputSearch } from "@/components/search/input";
import { SearchListItems } from "@/components/search/results";
import { BackButton } from "@/components/shared/back-button";
import { getLocaleOrThrow } from "@/lib/i18n/params";

export const revalidate = false;

export async function generateMetadata({
params,
}: {
Expand All @@ -26,19 +24,9 @@ export async function generateMetadata({
};
}

export default function Page(props: PageProps<"/[locale]/search">) {
const { params } = props;
const { locale: rawLocale } = use(params);
const locale = getLocaleOrThrow(rawLocale);

// Enable static rendering
setRequestLocale(locale);

export default function Page() {
return (
<div
className="relative min-h-[calc(100svh-4rem)] lg:min-h-svh"
data-pagefind-ignore
>
<div className="relative min-h-[calc(100svh-4rem)] lg:min-h-svh">
<div className="mx-auto w-full max-w-3xl px-6 py-24">
<div className="relative space-y-12">
<HomeHeader />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Id } from "@repo/backend/convex/_generated/dataModel";
import type { Metadata } from "next";
import { getTranslations, setRequestLocale } from "next-intl/server";
import { getTranslations } from "next-intl/server";
import { use } from "react";
import { UserChats } from "@/components/user/chats";
import { getLocaleOrThrow } from "@/lib/i18n/params";
Expand All @@ -23,13 +23,9 @@ export async function generateMetadata({
};
}

export default function Page(props: PageProps<"/[locale]/user/[id]/chat">) {
const { params } = props;
const { locale: rawLocale, id } = use(params);
const locale = getLocaleOrThrow(rawLocale);

// Enable static rendering
setRequestLocale(locale);

export default function Page({
params,
}: PageProps<"/[locale]/user/[id]/chat">) {
const { id } = use(params);
return <UserChats userId={id as Id<"users">} />;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ErrorBoundary } from "@repo/design-system/components/ui/error-boundary"
import { routing } from "@repo/internationalization/src/routing";
import { notFound } from "next/navigation";
import { hasLocale } from "next-intl";
import { setRequestLocale } from "next-intl/server";

import { use } from "react";
import { UserHeader } from "@/components/user/header";
import { UserTabs } from "@/components/user/tabs";
Expand All @@ -17,9 +17,6 @@ export default function Layout(props: LayoutProps<"/[locale]/user/[id]">) {
notFound();
}

// Enable static rendering
setRequestLocale(locale);

const userId = id as Id<"users">;

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Id } from "@repo/backend/convex/_generated/dataModel";
import type { Metadata } from "next";
import { getTranslations, setRequestLocale } from "next-intl/server";
import { getTranslations } from "next-intl/server";
import { use } from "react";
import { UserComments } from "@/components/user/comments";
import { getLocaleOrThrow } from "@/lib/i18n/params";
Expand All @@ -23,13 +23,7 @@ export async function generateMetadata({
};
}

export default function Page(props: PageProps<"/[locale]/user/[id]">) {
const { params } = props;
const { locale: rawLocale, id } = use(params);
const locale = getLocaleOrThrow(rawLocale);

// Enable static rendering
setRequestLocale(locale);

export default function Page({ params }: PageProps<"/[locale]/user/[id]">) {
const { id } = use(params);
return <UserComments userId={id as Id<"users">} />;
}
Loading