navigate(`/user/${comment.user.username}`)}>
-
})
+
@@ -680,14 +738,14 @@ function CommentTile({comment}: { comment: Comment }) {
}
-function DeleteFileDialog({fileId, uploaderId}: { fileId: string, uploaderId: number }) {
+function DeleteFileDialog({ fileId, uploaderId }: { fileId: string, uploaderId: number }) {
const [isLoading, setLoading] = useState(false)
const id = `delete_file_dialog_${fileId}`
const reload = useContext(context)
- const {t} = useTranslation();
+ const { t } = useTranslation();
const handleDelete = async () => {
if (isLoading) {
@@ -698,10 +756,10 @@ function DeleteFileDialog({fileId, uploaderId}: { fileId: string, uploaderId: nu
const dialog = document.getElementById(id) as HTMLDialogElement
dialog.close()
if (res.success) {
- showToast({message: t("File deleted successfully"), type: "success"})
+ showToast({ message: t("File deleted successfully"), type: "success" })
reload()
} else {
- showToast({message: res.message, type: "error"})
+ showToast({ message: res.message, type: "error" })
}
setLoading(false)
}
@@ -715,7 +773,7 @@ function DeleteFileDialog({fileId, uploaderId}: { fileId: string, uploaderId: nu
const dialog = document.getElementById(id) as HTMLDialogElement
dialog.showModal()
}}>
-
+