feat(frontend): purge all static content fallback files and enforce strict backend-only dynamic rendering

- Delete all legacy static content data files (members.ts, publications.ts, lectures.ts, standards.ts, projects.ts)
- Remove all fallback imports and static fallbacks across all page components
- Enforce strict dynamic runtime fetching where pages render empty datasets when Go backend server is unavailable
This commit is contained in:
2026-08-24 20:10:25 +09:00
parent 5041ab1ea8
commit f96f687dd1
13 changed files with 15 additions and 3704 deletions
@@ -2,7 +2,6 @@ import React from "react";
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { CategoryNav } from "../_components/CategoryNav";
import { publications as staticPubs, patents as staticPatents } from "../../../content/publications";
import { getPublications, getPatents } from "../../../lib/api";
import { PUB_CATEGORIES } from "../../../content/categories";
import { PubCategory } from "../../../content/types";
@@ -36,8 +35,8 @@ export default async function PublicationCategoryPage({ params }: PageProps) {
const slug = category as PubCategory;
const publications = (await getPublications()) ?? staticPubs;
const patents = (await getPatents()) ?? staticPatents;
const publications = (await getPublications()) ?? [];
const patents = (await getPatents()) ?? [];
const counts = {
"intl-journal-conf": publications.filter((p) => p.category === "intl-journal-conf").length,
@@ -1,7 +1,6 @@
import React from "react";
import Link from "next/link";
import { PUB_CATEGORIES } from "../../../content/categories";
import { publications as staticPubs, patents as staticPatents } from "../../../content/publications";
import { PubCategory } from "../../../content/types";
export interface CategoryCounts {
@@ -20,8 +19,7 @@ export function CategoryNav({ currentCategory, counts }: CategoryNavProps) {
if (counts?.[slug as keyof CategoryCounts] !== undefined) {
return counts[slug as keyof CategoryCounts]!;
}
if (slug === "patent") return staticPatents.length;
return staticPubs.filter((p) => p.category === slug).length;
return 0;
};
return (
+2 -3
View File
@@ -1,6 +1,5 @@
import type { Metadata } from "next";
import { CategoryNav } from "./_components/CategoryNav";
import { publications as staticPubs, patents as staticPatents } from "../../content/publications";
import { getPublications, getPatents } from "../../lib/api";
export const metadata: Metadata = {
@@ -11,8 +10,8 @@ export const metadata: Metadata = {
export const dynamic = "force-dynamic";
export default async function PublicationsIndexPage() {
const publications = (await getPublications()) ?? staticPubs;
const patents = (await getPatents()) ?? staticPatents;
const publications = (await getPublications()) ?? [];
const patents = (await getPatents()) ?? [];
const counts = {
"intl-journal-conf": publications.filter((p) => p.category === "intl-journal-conf").length,