From d57e3f5cf58bd0fe5539b1671988ba1166b1baea Mon Sep 17 00:00:00 2001 From: ajuvonen Date: Wed, 24 Jan 2024 09:53:16 +0200 Subject: [PATCH] Clean up code --- cypress/e2e/export.cy.ts | 2 +- src/components/ConfirmDialog.vue | 3 +-- src/components/EditTrainingDialog.vue | 3 +-- src/components/SimpleTrainingCard.vue | 3 +-- src/components/TrainingCard.vue | 3 +-- src/components/TrainingCardActions.vue | 6 ++---- src/components/WeekCalendarActions.vue | 3 +-- src/views/ExportView.vue | 3 +-- src/views/SettingsView.vue | 3 +-- 9 files changed, 10 insertions(+), 19 deletions(-) diff --git a/cypress/e2e/export.cy.ts b/cypress/e2e/export.cy.ts index 337a50e..edb18d3 100644 --- a/cypress/e2e/export.cy.ts +++ b/cypress/e2e/export.cy.ts @@ -27,5 +27,5 @@ it('downloads calendar file', () => { cy.get('.dp__calendar_item:not([aria-disabled])').first().click(); cy.getByTestId('navbar-export-link').click(); cy.getByTestId('export-download-button').click(); - cy.readFile(path.normalize(path.join(Cypress.config('downloadsFolder'), 'TrainingSchedule.ics'))).should('exist'); + cy.readFile(path.join(Cypress.config('downloadsFolder'), 'TrainingSchedule.ics')).should('exist'); }); diff --git a/src/components/ConfirmDialog.vue b/src/components/ConfirmDialog.vue index 60c94b8..da76d24 100644 --- a/src/components/ConfirmDialog.vue +++ b/src/components/ConfirmDialog.vue @@ -3,8 +3,7 @@ import {storeToRefs} from 'pinia'; import {useAppStateStore} from '@/stores/appState'; import BaseDialog from '@/components/BaseDialog.vue'; -const appStateStore = useAppStateStore(); -const {confirmDialogOpen, confirmText, confirmAction} = storeToRefs(appStateStore); +const {confirmDialogOpen, confirmText, confirmAction} = storeToRefs(useAppStateStore());