mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Remove unnecessary console.log statements
This commit is contained in:
parent
92c3b9c502
commit
e521853895
1 changed files with 0 additions and 7 deletions
|
@ -137,10 +137,8 @@ const ManageFilesModal: React.FC<{ onClose: () => void }> = ({ onClose }) => {
|
||||||
|
|
||||||
const deleteSelected = async () => {
|
const deleteSelected = async () => {
|
||||||
let filesToDelete = selectedFiles.length > 0 ? selectedFiles : filteredFiles;
|
let filesToDelete = selectedFiles.length > 0 ? selectedFiles : filteredFiles;
|
||||||
console.log("Delete selected files", filesToDelete);
|
|
||||||
|
|
||||||
if (filesToDelete.length === 0) {
|
if (filesToDelete.length === 0) {
|
||||||
console.log("No files to delete");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,15 +160,12 @@ const ManageFilesModal: React.FC<{ onClose: () => void }> = ({ onClose }) => {
|
||||||
|
|
||||||
// Reset selectedFiles
|
// Reset selectedFiles
|
||||||
setSelectedFiles([]);
|
setSelectedFiles([]);
|
||||||
|
|
||||||
console.log("Deleted files:", filesToDelete);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error deleting files:", error);
|
console.error("Error deleting files:", error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteFile = async (filename: string) => {
|
const deleteFile = async (filename: string) => {
|
||||||
console.log("Delete selected file", filename);
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`/api/content/file?filename=${encodeURIComponent(filename)}`,
|
`/api/content/file?filename=${encodeURIComponent(filename)}`,
|
||||||
|
@ -189,8 +184,6 @@ const ManageFilesModal: React.FC<{ onClose: () => void }> = ({ onClose }) => {
|
||||||
|
|
||||||
// Remove the file from selectedFiles if it's there
|
// Remove the file from selectedFiles if it's there
|
||||||
setSelectedFiles((prevSelected) => prevSelected.filter((file) => file !== filename));
|
setSelectedFiles((prevSelected) => prevSelected.filter((file) => file !== filename));
|
||||||
|
|
||||||
console.log("Deleted file:", filename);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error deleting file:", error);
|
console.error("Error deleting file:", error);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue