navigate(`/user/${comment.user.username}`)}>
-
})
+
@@ -753,14 +727,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) {
@@ -771,10 +745,10 @@ function DeleteFileDialog({ fileId, uploaderId }: { fileId: string, uploaderId:
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)
}
@@ -788,7 +762,7 @@ function DeleteFileDialog({ fileId, uploaderId }: { fileId: string, uploaderId:
const dialog = document.getElementById(id) as HTMLDialogElement
dialog.showModal()
}}>
-
+