From 1c22bf4c5bfc19d723986a0df98dbb0988090f25 Mon Sep 17 00:00:00 2001 From: "Ibrahima G. Coulibaly" Date: Thu, 3 Apr 2025 20:04:25 +0000 Subject: [PATCH] chore: hideCopy if video or audio --- src/components/result/ResultFooter.tsx | 20 ++++++++++++-------- src/components/result/ToolFileResult.tsx | 1 + src/tools/index.ts | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/components/result/ResultFooter.tsx b/src/components/result/ResultFooter.tsx index 4de3176..0e96521 100644 --- a/src/components/result/ResultFooter.tsx +++ b/src/components/result/ResultFooter.tsx @@ -7,11 +7,13 @@ import React from 'react'; export default function ResultFooter({ handleDownload, handleCopy, - disabled + disabled, + hideCopy }: { handleDownload: () => void; handleCopy: () => void; disabled?: boolean; + hideCopy?: boolean; }) { return ( @@ -22,13 +24,15 @@ export default function ResultFooter({ > Save as - + {!hideCopy && ( + + )} ); } diff --git a/src/components/result/ToolFileResult.tsx b/src/components/result/ToolFileResult.tsx index 09b17be..b5c18b1 100644 --- a/src/components/result/ToolFileResult.tsx +++ b/src/components/result/ToolFileResult.tsx @@ -173,6 +173,7 @@ export default function ToolFileResult({ disabled={!value} handleCopy={handleCopy} handleDownload={handleDownload} + hideCopy={fileType === 'video' || fileType === 'audio'} /> ); diff --git a/src/tools/index.ts b/src/tools/index.ts index 28a9b03..08a2cf8 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -17,9 +17,9 @@ const toolCategoriesOrder: ToolCategory[] = [ 'string', 'json', 'pdf', + 'video', 'list', 'csv', - 'video', 'number', 'png', 'time',