chore: hideCopy if video or audio

This commit is contained in:
Ibrahima G. Coulibaly
2025-04-03 20:04:25 +00:00
parent 3b37b67474
commit 1c22bf4c5b
3 changed files with 14 additions and 9 deletions

View File

@@ -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 (
<Stack mt={1} direction={'row'} spacing={2}>
@@ -22,13 +24,15 @@ export default function ResultFooter({
>
Save as
</Button>
<Button
disabled={disabled}
onClick={handleCopy}
startIcon={<ContentPasteIcon />}
>
Copy to clipboard
</Button>
{!hideCopy && (
<Button
disabled={disabled}
onClick={handleCopy}
startIcon={<ContentPasteIcon />}
>
Copy to clipboard
</Button>
)}
</Stack>
);
}

View File

@@ -173,6 +173,7 @@ export default function ToolFileResult({
disabled={!value}
handleCopy={handleCopy}
handleDownload={handleDownload}
hideCopy={fileType === 'video' || fileType === 'audio'}
/>
</Box>
);

View File

@@ -17,9 +17,9 @@ const toolCategoriesOrder: ToolCategory[] = [
'string',
'json',
'pdf',
'video',
'list',
'csv',
'video',
'number',
'png',
'time',