fix(web): remove payload admin routes + withPayload (stabilize prod)
Payload CMS integration crashes the entire production app — the withPayload wrapper + admin routes break when DB tables don't exist and the layout conflicts with i18n routing. Keeping: payload.config.ts, blog/changelog pages with graceful DB fallback, static blog post page. Payload admin will be added back once properly integrated with a dedicated route group that doesn't inherit the main app layout. The blog post at /blog/peer-messaging-claude-code is static TSX and works without Payload runtime. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from "next";
|
||||||
import { withPayload } from "@payloadcms/next/withPayload";
|
|
||||||
|
|
||||||
import env from "./env.config";
|
import env from "./env.config";
|
||||||
|
|
||||||
@@ -116,4 +115,4 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
|||||||
enabled: env.ANALYZE,
|
enabled: env.ANALYZE,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default withPayload(withBundleAnalyzer(config));
|
export default withBundleAnalyzer(config);
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
// @ts-nocheck — Payload generates these types at build time
|
|
||||||
import { RootPage, generatePageMetadata } from "@payloadcms/next/views";
|
|
||||||
import { importMap } from "../importMap";
|
|
||||||
import config from "@payload-config";
|
|
||||||
|
|
||||||
type Args = { params: Promise<{ segments: string[] }> };
|
|
||||||
|
|
||||||
export const generateMetadata = ({ params }: Args) =>
|
|
||||||
generatePageMetadata({ config, params });
|
|
||||||
|
|
||||||
export default function Page({ params }: Args) {
|
|
||||||
return <RootPage config={config} params={params} importMap={importMap} />;
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
// Auto-generated by Payload — placeholder until first build
|
|
||||||
export const importMap = {};
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
import "@payloadcms/next/css";
|
|
||||||
import type { ReactNode } from "react";
|
|
||||||
|
|
||||||
export const metadata = {
|
|
||||||
title: "Admin — claudemesh",
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function PayloadLayout({ children }: { children: ReactNode }) {
|
|
||||||
return (
|
|
||||||
<html lang="en">
|
|
||||||
<body>{children}</body>
|
|
||||||
</html>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user