Skip to content

Commit 7ffbe59

Browse files
committed
merge
1 parent 9655371 commit 7ffbe59

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

client/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"react": "^18.2.0",
2929
"react-dom": "^18.2.0",
3030
"react-icons": "^4.10.1",
31-
"react-router-dom": "^6.17.0"
31+
"react-router-dom": "^6.17.0",
32+
"reactjs-popup": "^2.0.6"
3233
},
3334
"devDependencies": {
3435
"@types/react": "^18.2.15",

client/src/routes/documents.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ export default function DocumentsPage() {
310310
.then(updateEmbeddings);
311311
};
312312
const clearDocuments = () => {
313+
const userConfirmed = window.confirm(
314+
"Are you sure you want to clear all documents? This action cannot be undone.",
315+
);
316+
if (!userConfirmed) return; // Exit the function if the user cancels
313317
notifications.clean();
314318
fetch(`/api/admin/clear_documents`, {
315319
method: "POST",

0 commit comments

Comments
 (0)