Skip to content

Commit

Permalink
refactor: delete progress files
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronm-2112 committed Nov 15, 2023
1 parent d038247 commit dd1cc08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/renderer/src/scripts/guided-mode/guided-curate-dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -2890,14 +2890,14 @@ const getProgressFileData = async (progressFile) => {

const deleteProgresFile = async (progressFileName) => {
//Get the path of the progress file to delete
const progressFilePathToDelete = path.join(guidedProgressFilePath, progressFileName + ".json");
const progressFilePathToDelete = window.path.join(guidedProgressFilePath, progressFileName + ".json");
//delete the progress file
window.fs.unlinkSync(progressFilePathToDelete, (err) => {
console.log(err);
});
};

const deleteProgressCard = async (progressCardDeleteButton) => {
window.deleteProgressCard = async (progressCardDeleteButton) => {
const progressCard = progressCardDeleteButton.parentElement.parentElement;
const progressCardNameToDelete = progressCard.querySelector(".progress-file-name").textContent;

Expand Down Expand Up @@ -3085,7 +3085,7 @@ const generateProgressCardElement = (progressFileJSONObj) => {
progressFileName,
workspaceUserNeedsToSwitchTo
)}
<h2 class="dataset-card-button-delete" onclick="deleteProgressCard(this)">
<h2 class="dataset-card-button-delete" onclick="window.deleteProgressCard(this)">
<i
class="fas fa-trash mr-sm-1"
></i>
Expand Down

0 comments on commit dd1cc08

Please sign in to comment.