From 94516f686762093f7316ef187ed2a1c2206c5a18 Mon Sep 17 00:00:00 2001 From: illfixit <66363651+illfixit@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:20:17 +0100 Subject: [PATCH] chore: remove comments --- .../src/app/core/utils/clipboard-utils.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/authority-portal-frontend/src/app/core/utils/clipboard-utils.ts b/authority-portal-frontend/src/app/core/utils/clipboard-utils.ts index f23ef6545..7afc73167 100644 --- a/authority-portal-frontend/src/app/core/utils/clipboard-utils.ts +++ b/authority-portal-frontend/src/app/core/utils/clipboard-utils.ts @@ -13,8 +13,6 @@ import {Injectable} from '@angular/core'; import {ToastService} from '../toast-notifications/toast.service'; -// adjust the path as needed - @Injectable({ providedIn: 'root', }) @@ -25,21 +23,17 @@ export class ClipboardUtils { const textarea = document.createElement('textarea'); textarea.value = text; - // Append the textarea to the document document.body.appendChild(textarea); textarea.select(); navigator.clipboard .writeText(text) .then(() => { - // On success, show a toast notification this.toastService.showSuccess('Copied to clipboard'); }) .catch(() => { - // On failure, show a toast notification this.toastService.showDanger('Failed to copy to clipboard'); }); - // Remove the textarea from the document document.body.removeChild(textarea); } }