Temporarily enable prefetching

This commit is contained in:
Sam Becker 2024-04-19 10:14:29 -05:00
parent 3bb3144eff
commit 66506ebf6e
5 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,6 @@
import Link from 'next/link';
import { clsx } from 'clsx/lite';
import { SHOULD_PREFETCH } from '@/site/config';
export default function SwitcherItem({
icon,
@ -8,7 +9,7 @@ export default function SwitcherItem({
onClick,
active,
noPadding,
prefetch = false,
prefetch = SHOULD_PREFETCH,
}: {
icon: JSX.Element
href?: string

View File

@ -19,13 +19,14 @@ import AdminPhotoMenu from '@/admin/AdminPhotoMenu';
import { Suspense } from 'react';
import DivDebugBaselineGrid from '@/components/DivDebugBaselineGrid';
import PhotoLink from './PhotoLink';
import { SHOULD_PREFETCH } from '@/site/config';
export default function PhotoLarge({
photo,
primaryTag,
priority,
prefetch = false,
prefetchRelatedLinks = false,
prefetch = SHOULD_PREFETCH,
prefetchRelatedLinks = SHOULD_PREFETCH,
showCamera = true,
showSimulation = true,
shouldShareTag,

View File

@ -5,6 +5,7 @@ import { clsx } from 'clsx/lite';
import { pathForPhoto } from '@/site/paths';
import { Camera } from '@/camera';
import { FilmSimulation } from '@/simulation';
import { SHOULD_PREFETCH } from '@/site/config';
export default function PhotoSmall({
photo,
@ -13,7 +14,7 @@ export default function PhotoSmall({
simulation,
selected,
priority,
prefetch = false,
prefetch = SHOULD_PREFETCH,
}: {
photo: Photo
tag?: string

View File

@ -3,13 +3,14 @@ import ImageTiny from '@/components/ImageTiny';
import Link from 'next/link';
import { clsx } from 'clsx/lite';
import { pathForPhoto } from '@/site/paths';
import { SHOULD_PREFETCH } from '@/site/config';
export default function PhotoTiny({
photo,
tag,
selected,
className,
prefetch = false,
prefetch = SHOULD_PREFETCH,
}: {
photo: Photo
tag?: string

View File

@ -2,6 +2,8 @@ import { parseAiAutoGeneratedFieldsText } from '@/photo/ai';
import type { StorageType } from '@/services/storage';
import { makeUrlAbsolute, shortenUrl } from '@/utility/url';
export const SHOULD_PREFETCH: boolean | undefined = undefined;
// META / DOMAINS
export const SITE_TITLE =