Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahjsu committed Nov 27, 2024
1 parent 9655371 commit 7ffbe59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.10.1",
"react-router-dom": "^6.17.0"
"react-router-dom": "^6.17.0",
"reactjs-popup": "^2.0.6"
},
"devDependencies": {
"@types/react": "^18.2.15",
Expand Down
4 changes: 4 additions & 0 deletions client/src/routes/documents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ export default function DocumentsPage() {
.then(updateEmbeddings);
};
const clearDocuments = () => {
const userConfirmed = window.confirm(
"Are you sure you want to clear all documents? This action cannot be undone.",
);
if (!userConfirmed) return; // Exit the function if the user cancels
notifications.clean();
fetch(`/api/admin/clear_documents`, {
method: "POST",
Expand Down

0 comments on commit 7ffbe59

Please sign in to comment.