Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pages that do not load data do not need to be async #296

Merged
merged 1 commit into from
Oct 29, 2024
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
4 changes: 1 addition & 3 deletions apps/nextjs/src/app/aila/[id]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ interface ChatLayoutProps {
children: React.ReactNode;
}

export default async function ChatLayout({
children,
}: Readonly<ChatLayoutProps>) {
export default function ChatLayout({ children }: Readonly<ChatLayoutProps>) {
return (
<div className="relative flex h-full overflow-hidden">
<div className="group w-full overflow-auto pl-0 duration-300 ease-in-out animate-in peer-[[data-state=open]]:lg:pl-[250px] peer-[[data-state=open]]:xl:pl-[300px]">
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/aila/help/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Help from ".";

export default async function HelpPage() {
export default function HelpPage() {
return <Help />;
}
4 changes: 2 additions & 2 deletions apps/nextjs/src/app/aila/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { redirect } from "next/navigation";
import { ChatStart } from "@/components/AppComponents/Chat/chat-start";
import Layout from "@/components/AppComponents/Layout";

export default async function IndexPage() {
export default function IndexPage() {
const clerkAuthentication = auth();
const { userId }: { userId: string | null } = clerkAuthentication;
if (!userId) {
redirect(`/sign-in?next=/aila`);
redirect("/sign-in?next=/aila");
}

return (
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/faqs/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FAQPage from ".";

const FAQ = async () => {
const FAQ = () => {
return <FAQPage />;
};

Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/generations/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default async function GenerationsPage() {
export default function GenerationsPage() {
return null;
}
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/legal/account-locked/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import AccountLocked from "./account-locked";

export default async function SuspendedPage() {
export default function SuspendedPage() {
return <AccountLocked />;
}
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/lesson-planner/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import LessonPlannerPage from ".";

export default async function LessonPlanner() {
export default function LessonPlanner() {
return <LessonPlannerPage />;
}
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/lesson-planner/preview/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PreviewRedirect from "./preview-redirect";

export default async function PreviewRedirectPage() {
export default function PreviewRedirectPage() {
return <PreviewRedirect />;
}
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/quiz-designer/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import QuizDesignerPage from "./quiz-designer-page";

export default async function QuizDesigner() {
export default function QuizDesigner() {
return <QuizDesignerPage />;
}
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/quiz-designer/preview/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PreviewRedirect from "./preview-redirect";

export default async function PreviewRedirectPage() {
export default function PreviewRedirectPage() {
return <PreviewRedirect />;
}
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/test-support/clerk/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { notFound } from "next/navigation";
* This is a minimal page that gives it access to a clerk instance
*/

export default async function TestSupportSignIn() {
export default function TestSupportSignIn() {
if (
process.env.NODE_ENV !== "development" &&
process.env.VERCEL_ENV !== "preview"
Expand Down
Loading