Shortcodes
This commit is contained in:
@@ -23,7 +23,7 @@ interface PhotoDialogProps {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
onDelete?: (id: Media["id"]) => void;
|
||||
onSave: (photo: Omit<Media, "id">, file: File) => void;
|
||||
onSave: (photo: Omit<Media, "id"> | Media, file: File) => void;
|
||||
}
|
||||
|
||||
export function PhotoDialog({
|
||||
@@ -34,7 +34,7 @@ export function PhotoDialog({
|
||||
onSave,
|
||||
}: PhotoDialogProps) {
|
||||
const [file, setFile] = useState<File | null>(null);
|
||||
const [newPhoto, setNewPhoto] = useState<Omit<Media, "id">>({
|
||||
const [newPhoto, setNewPhoto] = useState<Omit<Media, "id"> | Media>({
|
||||
url: "",
|
||||
alt: "",
|
||||
path: "",
|
||||
|
||||
Reference in New Issue
Block a user