force-static on pages

This commit is contained in:
Kentai Radiquum 2025-02-10 06:53:15 +05:00
parent 628b3870d8
commit 9f80ff3262
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
14 changed files with 904 additions and 670 deletions

View file

@ -1,4 +1,5 @@
import { BookmarksCategoryPage } from "#/pages/BookmarksCategory"; import { BookmarksCategoryPage } from "#/pages/BookmarksCategory";
export const dynamic = 'force-static';
const SectionTitleMapping = { const SectionTitleMapping = {
watching: "Смотрю", watching: "Смотрю",

View file

@ -1,6 +1,7 @@
import { ViewCollectionPage } from "#/pages/ViewCollection"; import { ViewCollectionPage } from "#/pages/ViewCollection";
import { fetchDataViaGet } from "#/api/utils"; import { fetchDataViaGet } from "#/api/utils";
import type { Metadata, ResolvingMetadata } from "next"; import type { Metadata, ResolvingMetadata } from "next";
export const dynamic = 'force-static';
export async function generateMetadata( export async function generateMetadata(
{ params }, { params },

View file

@ -1,18 +1,10 @@
import { CreateCollectionPage } from "#/pages/CreateCollection"; import { CreateCollectionPage } from "#/pages/CreateCollection";
import dynamic from "next/dynamic";
export const metadata = { export const metadata = {
title: "Создание коллекции", title: "Создание коллекции",
description: "Создание новой коллекции", description: "Создание новой коллекции",
}; };
const CreateCollectionDynamic = dynamic(
() => Promise.resolve(CreateCollectionPage),
{
ssr: false,
}
);
export default function Collections() { export default function Collections() {
return <CreateCollectionDynamic />; return <CreateCollectionPage />;
} }

View file

@ -1,4 +1,5 @@
import { IndexCategoryPage } from "#/pages/IndexCategory"; import { IndexCategoryPage } from "#/pages/IndexCategory";
export const dynamic = 'force-static';
const SectionTitleMapping = { const SectionTitleMapping = {
last: "Последние релизы", last: "Последние релизы",

View file

@ -1,4 +1,3 @@
import dynamic from "next/dynamic";
import { LoginPage } from "#/pages/Login"; import { LoginPage } from "#/pages/Login";
export const metadata = { export const metadata = {
@ -6,9 +5,6 @@ export const metadata = {
description: "Вход в аккаунт anixart", description: "Вход в аккаунт anixart",
} }
const LoginDynamic = dynamic(() => Promise.resolve(LoginPage), {
ssr: false,
});
export default function Login() { export default function Login() {
return <LoginDynamic />; return <LoginPage />;
} }

View file

@ -1,6 +1,7 @@
import { BookmarksCategoryPage } from "#/pages/BookmarksCategory"; import { BookmarksCategoryPage } from "#/pages/BookmarksCategory";
import { fetchDataViaGet } from "#/api/utils"; import { fetchDataViaGet } from "#/api/utils";
import type { Metadata, ResolvingMetadata } from "next"; import type { Metadata, ResolvingMetadata } from "next";
export const dynamic = 'force-static';
const SectionTitleMapping = { const SectionTitleMapping = {
watching: "Смотрю", watching: "Смотрю",

View file

@ -1,6 +1,7 @@
import { BookmarksPage } from "#/pages/Bookmarks"; import { BookmarksPage } from "#/pages/Bookmarks";
import { fetchDataViaGet } from "#/api/utils"; import { fetchDataViaGet } from "#/api/utils";
import type { Metadata, ResolvingMetadata } from "next"; import type { Metadata, ResolvingMetadata } from "next";
export const dynamic = 'force-static';
export async function generateMetadata( export async function generateMetadata(
{ params }, { params },

View file

@ -1,6 +1,7 @@
import { CollectionsFullPage } from "#/pages/CollectionsFull"; import { CollectionsFullPage } from "#/pages/CollectionsFull";
import { fetchDataViaGet } from "#/api/utils"; import { fetchDataViaGet } from "#/api/utils";
import type { Metadata, ResolvingMetadata } from "next"; import type { Metadata, ResolvingMetadata } from "next";
export const dynamic = 'force-static';
export async function generateMetadata( export async function generateMetadata(
{ params }, { params },

View file

@ -1,6 +1,7 @@
import { ProfilePage } from "#/pages/Profile"; import { ProfilePage } from "#/pages/Profile";
import { fetchDataViaGet } from "#/api/utils"; import { fetchDataViaGet } from "#/api/utils";
import type { Metadata, ResolvingMetadata } from "next"; import type { Metadata, ResolvingMetadata } from "next";
export const dynamic = 'force-static';
export async function generateMetadata( export async function generateMetadata(
{ params }, { params },

View file

@ -1,6 +1,7 @@
import { RelatedPage } from "#/pages/Related"; import { RelatedPage } from "#/pages/Related";
import { fetchDataViaGet } from "#/api/utils"; import { fetchDataViaGet } from "#/api/utils";
import type { Metadata, ResolvingMetadata } from "next"; import type { Metadata, ResolvingMetadata } from "next";
export const dynamic = 'force-static';
export async function generateMetadata({ params }, parent: ResolvingMetadata): Promise<Metadata> { export async function generateMetadata({ params }, parent: ResolvingMetadata): Promise<Metadata> {
const id:string = params.id; const id:string = params.id;

View file

@ -1,6 +1,7 @@
import { CollectionsFullPage } from "#/pages/CollectionsFull"; import { CollectionsFullPage } from "#/pages/CollectionsFull";
import { fetchDataViaGet } from "#/api/utils"; import { fetchDataViaGet } from "#/api/utils";
import type { Metadata, ResolvingMetadata } from "next"; import type { Metadata, ResolvingMetadata } from "next";
export const dynamic = 'force-static';
export async function generateMetadata( export async function generateMetadata(
{ params }, { params },

View file

@ -1,6 +1,7 @@
import { ReleasePage } from "#/pages/Release"; import { ReleasePage } from "#/pages/Release";
import { fetchDataViaGet } from "#/api/utils"; import { fetchDataViaGet } from "#/api/utils";
import type { Metadata, ResolvingMetadata } from "next"; import type { Metadata, ResolvingMetadata } from "next";
export const dynamic = 'force-static';
export async function generateMetadata( export async function generateMetadata(
{ params }, { params },

View file

@ -1,18 +1,10 @@
import dynamic from "next/dynamic";
import { SearchPage } from "#/pages/Search"; import { SearchPage } from "#/pages/Search";
import { Metadata } from "next";
export async function generateMetadata({ searchParams }): Promise<Metadata> { export const metadata = {
const query = searchParams.q; title: "Поиск",
description: "Поиск аниме релизов",
return {
title: query || "Поиск",
}; };
}
const SearchDynamic = dynamic(() => Promise.resolve(SearchPage), {
ssr: false,
});
export default function Search() { export default function Search() {
return <SearchDynamic />; return <SearchPage />;
} }

1530
package-lock.json generated

File diff suppressed because it is too large Load diff