Move static generation utility file

This commit is contained in:
Sam Becker 2025-03-18 21:14:37 -05:00
parent 1796e0a24f
commit 4b9077fa9c
15 changed files with 15 additions and 15 deletions

View File

@ -10,7 +10,7 @@ import { getIBMPlexMono } from '@/app/font';
import { ImageResponse } from 'next/og';
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
import { getUniqueFilmSimulations } from '@/photo/db/query';
import { staticallyGenerateCategoryIfConfigured } from '@/category/server';
import { staticallyGenerateCategoryIfConfigured } from '@/app/static';
export const generateStaticParams = staticallyGenerateCategoryIfConfigured(
'films',

View File

@ -7,7 +7,7 @@ import { Metadata } from 'next/types';
import { cache } from 'react';
import { PATH_ROOT } from '@/app/paths';
import { redirect } from 'next/navigation';
import { staticallyGenerateCategoryIfConfigured } from '@/category/server';
import { staticallyGenerateCategoryIfConfigured } from '@/app/static';
const getPhotosFilmSimulationDataCachedCached =
cache(getPhotosFilmSimulationDataCached);

View File

@ -10,7 +10,7 @@ import FocalLengthImageResponse from
'@/image-response/FocalLengthImageResponse';
import { formatFocalLength, getFocalLengthFromString } from '@/focal';
import { getUniqueFocalLengths } from '@/photo/db/query';
import { staticallyGenerateCategoryIfConfigured } from '@/category/server';
import { staticallyGenerateCategoryIfConfigured } from '@/app/static';
export const generateStaticParams = staticallyGenerateCategoryIfConfigured(
'focal-lengths',

View File

@ -7,7 +7,7 @@ import { PATH_ROOT } from '@/app/paths';
import type { Metadata } from 'next';
import { redirect } from 'next/navigation';
import { cache } from 'react';
import { staticallyGenerateCategoryIfConfigured } from '@/category/server';
import { staticallyGenerateCategoryIfConfigured } from '@/app/static';
const getPhotosFocalDataCachedCached = cache((focal: number) =>
getPhotosFocalLengthDataCached({

View File

@ -13,7 +13,7 @@ import {
safelyGenerateLensStaticParams,
} from '@/lens';
import LensImageResponse from '@/image-response/LensImageResponse';
import { staticallyGenerateCategoryIfConfigured } from '@/category/server';
import { staticallyGenerateCategoryIfConfigured } from '@/app/static';
export const generateStaticParams = staticallyGenerateCategoryIfConfigured(
'lenses',

View File

@ -12,7 +12,7 @@ import {
} from '@/lens';
import {
staticallyGenerateCategoryIfConfigured,
} from '@/category/server';
} from '@/app/static';
const getPhotosLensDataCachedCached = cache((
make: string | undefined,

View File

@ -5,7 +5,7 @@ import { getIBMPlexMono } from '@/app/font';
import { ImageResponse } from 'next/og';
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
import { isNextImageReadyBasedOnPhotos } from '@/photo';
import { staticallyGeneratePhotosIfConfigured } from '@/category/server';
import { staticallyGeneratePhotosIfConfigured } from '@/app/static';
export const generateStaticParams = staticallyGeneratePhotosIfConfigured(
'image',

View File

@ -13,7 +13,7 @@ import {
import PhotoDetailPage from '@/photo/PhotoDetailPage';
import { getPhotosNearIdCached } from '@/photo/cache';
import { cache } from 'react';
import { staticallyGeneratePhotosIfConfigured } from '@/category/server';
import { staticallyGeneratePhotosIfConfigured } from '@/app/static';
export const maxDuration = 60;

View File

@ -8,7 +8,7 @@ import { ImageResponse } from 'next/og';
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
import { getUniqueRecipes } from '@/photo/db/query';
import RecipeImageResponse from '@/image-response/RecipeImageResponse';
import { staticallyGenerateCategoryIfConfigured } from '@/category/server';
import { staticallyGenerateCategoryIfConfigured } from '@/app/static';
export const generateStaticParams = staticallyGenerateCategoryIfConfigured(
'recipes',

View File

@ -7,7 +7,7 @@ import { cache } from 'react';
import { generateMetaForRecipe } from '@/recipe';
import RecipeOverview from '@/recipe/RecipeOverview';
import { getPhotosRecipeDataCached } from '@/recipe/data';
import { staticallyGenerateCategoryIfConfigured } from '@/category/server';
import { staticallyGenerateCategoryIfConfigured } from '@/app/static';
const getPhotosRecipeDataCachedCached = cache(getPhotosRecipeDataCached);

View File

@ -9,7 +9,7 @@ import { getIBMPlexMono } from '@/app/font';
import { ImageResponse } from 'next/og';
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
import { getUniqueCameras } from '@/photo/db/query';
import { staticallyGenerateCategoryIfConfigured } from '@/category/server';
import { staticallyGenerateCategoryIfConfigured } from '@/app/static';
export const generateStaticParams = staticallyGenerateCategoryIfConfigured(
'cameras',

View File

@ -6,7 +6,7 @@ import { getPhotosCameraDataCached } from '@/camera/data';
import CameraOverview from '@/camera/CameraOverview';
import { cache } from 'react';
import { getUniqueCameras } from '@/photo/db/query';
import { staticallyGenerateCategoryIfConfigured } from '@/category/server';
import { staticallyGenerateCategoryIfConfigured } from '@/app/static';
const getPhotosCameraDataCachedCached = cache((
make: string,

View File

@ -8,7 +8,7 @@ import { getIBMPlexMono } from '@/app/font';
import { ImageResponse } from 'next/og';
import { getImageResponseCacheControlHeaders } from '@/image-response/cache';
import { getUniqueTags } from '@/photo/db/query';
import { staticallyGenerateCategoryIfConfigured } from '@/category/server';
import { staticallyGenerateCategoryIfConfigured } from '@/app/static';
export const generateStaticParams = staticallyGenerateCategoryIfConfigured(
'tags',

View File

@ -7,7 +7,7 @@ import { getPhotosTagDataCached } from '@/tag/data';
import type { Metadata } from 'next';
import { redirect } from 'next/navigation';
import { cache } from 'react';
import { staticallyGenerateCategoryIfConfigured } from '@/category/server';
import { staticallyGenerateCategoryIfConfigured } from '@/app/static';
const getPhotosTagDataCachedCached = cache((tag: string) =>
getPhotosTagDataCached({ tag, limit: INFINITE_SCROLL_GRID_INITIAL}));

View File

@ -1,4 +1,4 @@
import { CategoryKey } from '.';
import { CategoryKey } from '../category';
import {
CATEGORY_VISIBILITY,
IS_BUILDING,