This commit is contained in:
Jared Palmer 2023-06-02 13:29:54 -04:00
parent 0846554fa2
commit 09ac763958
2 changed files with 4 additions and 4 deletions

View file

@ -6,6 +6,9 @@ import { db, chats } from "@/lib/db/schema";
import { eq } from "drizzle-orm"; import { eq } from "drizzle-orm";
import { Chat } from "@/app/chat"; import { Chat } from "@/app/chat";
import { Message } from "ai-connector"; import { Message } from "ai-connector";
export const runtime = "edge";
export const preferredRegion = "home";
export interface ChatPageProps { export interface ChatPageProps {
params: { params: {
id: string; id: string;
@ -23,9 +26,6 @@ export async function generateMetadata({
}; };
} }
export const runtime = "edge"; // default
export const preferredRegion = "home";
export default async function ChatPage({ params }: ChatPageProps) { export default async function ChatPage({ params }: ChatPageProps) {
const session = await auth(); const session = await auth();
const chat = await db.query.chats.findFirst({ const chat = await db.query.chats.findFirst({

View file

@ -2,7 +2,7 @@ import { Chat } from "./chat";
import { Sidebar } from "./sidebar"; import { Sidebar } from "./sidebar";
import { auth } from "@/auth"; import { auth } from "@/auth";
export const runtime = "edge"; // default export const runtime = "edge";
export const preferredRegion = "home"; export const preferredRegion = "home";
export default async function IndexPage() { export default async function IndexPage() {