feat: Add export const dynamic = "force-dynamic" to all main pages to ensure dynamic rendering.
This commit is contained in:
@@ -4,6 +4,8 @@ import { format } from "date-fns";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { ChevronLeft, Calendar, Clock, Tag as TagIcon, Share2 } from "lucide-react";
|
import { ChevronLeft, Calendar, Clock, Tag as TagIcon, Share2 } from "lucide-react";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
export default async function BlogDetailPage({
|
export default async function BlogDetailPage({
|
||||||
params
|
params
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import Link from "next/link";
|
|||||||
import { Calendar, Clock, ArrowRight, Tag as TagIcon, Search } from "lucide-react";
|
import { Calendar, Clock, ArrowRight, Tag as TagIcon, Search } from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
async function getPublishedBlogs() {
|
async function getPublishedBlogs() {
|
||||||
return await prisma.blog.findMany({
|
return await prisma.blog.findMany({
|
||||||
where: { status: "PUBLISHED" },
|
where: { status: "PUBLISHED" },
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { prisma } from "@/lib/prisma";
|
|||||||
import { BlogForm } from "@/components/dashboard/blog/BlogForm";
|
import { BlogForm } from "@/components/dashboard/blog/BlogForm";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
export default async function EditBlogPage({
|
export default async function EditBlogPage({
|
||||||
params
|
params
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import Link from "next/link";
|
|||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
export default async function DashboardBlogPage() {
|
export default async function DashboardBlogPage() {
|
||||||
const blogs = await getBlogs();
|
const blogs = await getBlogs();
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { prisma } from "@/lib/prisma";
|
|||||||
import { ExperienceForm } from "@/components/dashboard/experience/ExperienceForm";
|
import { ExperienceForm } from "@/components/dashboard/experience/ExperienceForm";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
export default async function EditExperiencePage({
|
export default async function EditExperiencePage({
|
||||||
params
|
params
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import Link from "next/link";
|
|||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
export default async function DashboardExperiencePage() {
|
export default async function DashboardExperiencePage() {
|
||||||
const experiences = await getExperiences();
|
const experiences = await getExperiences();
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import {
|
|||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
async function getStats() {
|
async function getStats() {
|
||||||
const [totalVisitors, totalPageViews, recentSessions] = await Promise.all([
|
const [totalVisitors, totalPageViews, recentSessions] = await Promise.all([
|
||||||
prisma.session.count(),
|
prisma.session.count(),
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { prisma } from "@/lib/prisma";
|
|||||||
import { ProjectForm } from "@/components/dashboard/projects/ProjectForm";
|
import { ProjectForm } from "@/components/dashboard/projects/ProjectForm";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
export default async function EditProjectPage({
|
export default async function EditProjectPage({
|
||||||
params
|
params
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import {
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
export default async function DashboardProjectsPage() {
|
export default async function DashboardProjectsPage() {
|
||||||
const projects = await getProjects();
|
const projects = await getProjects();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user