Fix upload page AI incompatibilities
This commit is contained in:
parent
097496a739
commit
ec828f6977
@ -3,7 +3,6 @@ import { extractExifDataFromBlobPath } from '@/photo/server';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { getUniqueTagsCached } from '@/photo/cache';
|
||||
import UploadPageClient from '@/photo/UploadPageClient';
|
||||
import { AI_TEXT_GENERATION_ENABLED } from '@/site/config';
|
||||
|
||||
interface Params {
|
||||
params: { uploadPath: string }
|
||||
@ -19,14 +18,11 @@ export default async function UploadPage({ params: { uploadPath } }: Params) {
|
||||
|
||||
const uniqueTags = await getUniqueTagsCached();
|
||||
|
||||
const aiTextGeneration = AI_TEXT_GENERATION_ENABLED;
|
||||
|
||||
return (
|
||||
<UploadPageClient {...{
|
||||
blobId,
|
||||
photoFormExif,
|
||||
uniqueTags,
|
||||
aiTextGeneration,
|
||||
}} />
|
||||
);
|
||||
};
|
||||
|
||||
@ -11,12 +11,10 @@ export default function UploadPageClient({
|
||||
blobId,
|
||||
photoFormExif,
|
||||
uniqueTags,
|
||||
aiTextGeneration,
|
||||
}: {
|
||||
blobId?: string
|
||||
photoFormExif: Partial<PhotoFormData>
|
||||
uniqueTags: Tags
|
||||
aiTextGeneration: boolean
|
||||
}) {
|
||||
const [pending, setIsPending] = useState(false);
|
||||
const [updatedTitle, setUpdatedTitle] = useState('');
|
||||
@ -33,7 +31,6 @@ export default function UploadPageClient({
|
||||
<PhotoForm
|
||||
initialPhotoForm={photoFormExif}
|
||||
uniqueTags={uniqueTags}
|
||||
aiTextGeneration={aiTextGeneration}
|
||||
onTitleChange={setUpdatedTitle}
|
||||
onFormStatusChange={setIsPending}
|
||||
/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user