Skip to content

Commit 5fa6864

Browse files
committed
fix(cloudfare):due to dynamic ssr that file has to marked with runtime edge to work probably
1 parent 1e0d7c9 commit 5fa6864

4 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/app/api/complaints/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { NextResponse } from 'next/server';
22
import { promises as fs } from 'fs';
33
import path from 'path';
44
export const dynamic = 'force-static'; // Add this line
5+
export const runtime = 'edge';
56

67
const isDev = process.env.NODE_ENV === 'development';
78
const complaintsFile = isDev ? path.join(process.cwd(), 'complaints.json') : null;

src/app/api/set-auth-cookie/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { NextRequest, NextResponse } from 'next/server';
22
// import { getAuth } from 'firebase-admin/auth';
33
// import { initializeApp, getApps, cert } from 'firebase-admin/app';
44
import { serialize } from 'cookie';
5+
export const runtime = 'edge';
56

67
// const serviceAccount = {
78
// projectId: process.env.FIREBASE_PROJECT_ID,

src/app/club/[slug]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { notFound } from 'next/navigation';
33
import clubData from 'src/components/club/ClubData';
44
import ClubDetail from '@/components/club/ClubDetail';
5+
export const runtime = 'edge';
56

67
export default async function ClubDetailPage({
78
params,

src/app/subject/[id]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
getSubjects,
2222
} from "@/lib/idb";
2323
import toast from "react-hot-toast";
24+
export const runtime = 'edge';
2425

2526
export default function SubjectCalendarPage() {
2627
const { id: subjectId } = useParams();

0 commit comments

Comments
 (0)