Move static generation utility file
This commit is contained in:
parent
1796e0a24f
commit
4b9077fa9c
@ -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',
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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({
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -12,7 +12,7 @@ import {
|
||||
} from '@/lens';
|
||||
import {
|
||||
staticallyGenerateCategoryIfConfigured,
|
||||
} from '@/category/server';
|
||||
} from '@/app/static';
|
||||
|
||||
const getPhotosLensDataCachedCached = cache((
|
||||
make: string | undefined,
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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}));
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CategoryKey } from '.';
|
||||
import { CategoryKey } from '../category';
|
||||
import {
|
||||
CATEGORY_VISIBILITY,
|
||||
IS_BUILDING,
|
||||
Loading…
Reference in New Issue
Block a user