perf : cache
This commit is contained in:
@@ -2,12 +2,12 @@ import { redirect } from "next/navigation";
|
||||
import { connection } from "next/server";
|
||||
|
||||
import { ConstellationImageGenerator } from "@/components/admin/constellation-image-generator";
|
||||
import { getActiveCatalog } from "@/lib/guides/queries";
|
||||
import { getCachedCatalogOptions } from "@/lib/cache/catalog";
|
||||
|
||||
export default async function ConstellationImagePage() {
|
||||
await connection();
|
||||
|
||||
const catalog = await getActiveCatalog();
|
||||
const catalog = await getCachedCatalogOptions();
|
||||
if (!catalog) redirect("/admin?sync=required");
|
||||
|
||||
return (
|
||||
|
||||
@@ -2,13 +2,13 @@ import { redirect } from "next/navigation";
|
||||
import { connection } from "next/server";
|
||||
|
||||
import { OverviewImageGenerator } from "@/components/admin/overview-image-generator";
|
||||
import { getActiveCatalog } from "@/lib/guides/queries";
|
||||
import { getCachedActiveCatalog } from "@/lib/cache/catalog";
|
||||
import { elementOrder } from "@/lib/overview-image";
|
||||
|
||||
export default async function OverviewImagePage() {
|
||||
await connection();
|
||||
|
||||
const catalog = await getActiveCatalog();
|
||||
const catalog = await getCachedActiveCatalog();
|
||||
if (!catalog) redirect("/admin?sync=required");
|
||||
|
||||
const elementIconUrls = Object.fromEntries(
|
||||
|
||||
@@ -2,12 +2,12 @@ import { redirect } from "next/navigation";
|
||||
import { connection } from "next/server";
|
||||
|
||||
import { TeamImageGenerator } from "@/components/admin/team-image-generator";
|
||||
import { getActiveCatalog } from "@/lib/guides/queries";
|
||||
import { getCachedCatalogOptions } from "@/lib/cache/catalog";
|
||||
|
||||
export default async function TeamImagePage() {
|
||||
await connection();
|
||||
|
||||
const catalog = await getActiveCatalog();
|
||||
const catalog = await getCachedCatalogOptions();
|
||||
if (!catalog) redirect("/admin?sync=required");
|
||||
|
||||
return (
|
||||
|
||||
@@ -2,12 +2,12 @@ import { redirect } from "next/navigation";
|
||||
import { connection } from "next/server";
|
||||
|
||||
import { WeaponImageGenerator } from "@/components/admin/weapon-image-generator";
|
||||
import { getActiveCatalog } from "@/lib/guides/queries";
|
||||
import { getCachedCatalogOptions } from "@/lib/cache/catalog";
|
||||
|
||||
export default async function WeaponImagePage() {
|
||||
await connection();
|
||||
|
||||
const catalog = await getActiveCatalog();
|
||||
const catalog = await getCachedCatalogOptions();
|
||||
if (!catalog) redirect("/admin?sync=required");
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user