Bild wird resetted

This commit is contained in:
MisbehavedNinjaRadiator 2025-06-24 22:31:01 +02:00 committed by Rudi Regentonne
parent 85b0e156de
commit fd1bf1c10f
4 changed files with 41 additions and 70 deletions

View file

@ -35,7 +35,7 @@ export default function AvatarDialog({
ownAccount: boolean;
username: string;
}) {
const { openFilePicker, filesContent, loading } = useFilePicker({
const { openFilePicker, filesContent, loading, clear } = useFilePicker({
accept: ".png, .jpg, .jpeg",
multiple: false,
readAs: "DataURL",
@ -56,7 +56,7 @@ export default function AvatarDialog({
setOpen(true);
};
const handleClose = () => {
setImageURL({ newImage: false }); // Reset the selected image when closing
clear(); // Reset the selected image when closing
setOpen(false);
};
const handleSaveChanges = () => {