From 9740ead49bcafe8de56d76010bc7d3fd76365226 Mon Sep 17 00:00:00 2001 From: PiotrMatyjasik Date: Wed, 22 Mar 2023 10:00:10 +0100 Subject: [PATCH 1/3] Fix todo tags && fix handling error while copying --- src/features/settings/settingsManager.ts | 1 - .../components/SurveyRow/SurveyRow.tsx | 22 +++++++++---------- .../surveys/managers/createSurveyManager.ts | 3 +-- .../surveys/managers/surveyResultsManager.ts | 1 - src/pages/surveys/index.tsx | 16 ++++++-------- src/shared/hooks/useCopyToClipboard.ts | 6 +++-- 6 files changed, 22 insertions(+), 27 deletions(-) diff --git a/src/features/settings/settingsManager.ts b/src/features/settings/settingsManager.ts index 6dad4298..8427e562 100644 --- a/src/features/settings/settingsManager.ts +++ b/src/features/settings/settingsManager.ts @@ -67,7 +67,6 @@ export const useSettingsManager = (): SettingsManager => { router.replace('/'); } catch (error) { toast.error('Error deleting account'); - console.error(error); } }; diff --git a/src/features/surveys/components/SurveyRow/SurveyRow.tsx b/src/features/surveys/components/SurveyRow/SurveyRow.tsx index eb6c86ef..a8bdcdf1 100644 --- a/src/features/surveys/components/SurveyRow/SurveyRow.tsx +++ b/src/features/surveys/components/SurveyRow/SurveyRow.tsx @@ -44,7 +44,6 @@ export default function SurveyRow({ window.location.hostname === 'localhost' ? 'http://' : 'https://'; const link = `${domain}${window.location.host}/survey/${id}`; copy(link); - toast.success('Link copied to clipboard'); }; const handleOnMoreButton = () => { @@ -58,14 +57,13 @@ export default function SurveyRow({ toast.success('Survey deleted'); } catch (error) { toast.error('Error deleting survey'); - console.error(error); } }; return ( -
-
-
+
+
+
{question}
@@ -77,7 +75,7 @@ export default function SurveyRow({
-
+
-
+