Skip to content

Commit

Permalink
fix cache
Browse files Browse the repository at this point in the history
  • Loading branch information
thivy committed Sep 27, 2023
1 parent 3a5fd42 commit 7826a9d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/chat/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import { FindChatThreadByID } from "@/features/chat/chat-services/chat-thread-se
import { ChatUI } from "@/features/chat/chat-ui/chat-ui";
import { notFound } from "next/navigation";

export const dynamic = "force-dynamic";

export default async function Home({ params }: { params: { id: string } }) {
const [items, thread] = await Promise.all([
FindAllChats(params.id),
FindChatThreadByID(params.id)
FindChatThreadByID(params.id),
]);

if (thread.length === 0) {
Expand Down
2 changes: 2 additions & 0 deletions src/app/chat/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { ChatMenuContainer } from "@/features/chat/chat-menu/chat-menu-container
import { MainMenu } from "@/features/menu/menu";
import { AI_NAME } from "@/features/theme/customise";

export const dynamic = "force-dynamic";

export const metadata = {
title: AI_NAME,
description: AI_NAME,
Expand Down
2 changes: 2 additions & 0 deletions src/app/chat/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Card } from "@/components/ui/card";
import { StartNewChat } from "@/features/chat/chat-ui/start-new-chat";

export const dynamic = "force-dynamic";

export default async function Home() {
return (
<Card className="h-full items-center flex justify-center flex-1">
Expand Down
2 changes: 2 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { cn } from "@/lib/utils";
import { Inter } from "next/font/google";
import "./globals.css";

export const dynamic = "force-dynamic";

const inter = Inter({ subsets: ["latin"] });

export const metadata = {
Expand Down
2 changes: 2 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Card } from "@/components/ui/card";
import { userSession } from "@/features/auth/helpers";
import { redirect } from "next/navigation";

export const dynamic = "force-dynamic";

export default async function Home() {
const user = await userSession();
if (user) {
Expand Down

0 comments on commit 7826a9d

Please sign in to comment.