Change image edit to recreate palettes
This commit is contained in:
@ -19,8 +19,8 @@ import { toast } from "sonner";
|
||||
import * as z from "zod/v4";
|
||||
|
||||
type ImageWithItems = Image & {
|
||||
album: Album,
|
||||
artist: Artist,
|
||||
album: Album | null,
|
||||
artist: Artist | null,
|
||||
colors: ImageColor[],
|
||||
extractColors: ExtractColor[],
|
||||
metadata: ImageMetadata[],
|
||||
@ -28,9 +28,11 @@ type ImageWithItems = Image & {
|
||||
stats: ImageStats[],
|
||||
theme: ThemeSeed[],
|
||||
variants: ImageVariant[],
|
||||
palettes: ColorPalette[] & {
|
||||
items: ColorPaletteItem[]
|
||||
}
|
||||
palettes: (
|
||||
ColorPalette & {
|
||||
items: ColorPaletteItem[]
|
||||
}
|
||||
)[]
|
||||
};
|
||||
|
||||
export default function EditImageForm({ image, artists, albums }: { image: ImageWithItems, artists: Artist[], albums: Album[] }) {
|
||||
@ -64,7 +66,6 @@ export default function EditImageForm({ image, artists, albums }: { image: Image
|
||||
const updatedImage = await updateImage(values, image.id)
|
||||
if (updatedImage) {
|
||||
toast.success("Image updated")
|
||||
|
||||
router.push(`/images`)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user