@nextrapi is there a way only to customize the CopyLinkButton component located at:\node_modules@strapi\plugin-upload\admin\src\components\CopyLinkButton\index.js) instead?
something like that?
import React from 'react';
import PropTypes from 'prop-types';
import { useIntl } from 'react-intl';
import { IconButton } from '@strapi/design-system/IconButton';
import { CopyToClipboard } from 'react-copy-to-clipboard';
import { useNotification } from '@strapi/helper-plugin';
import LinkIcon from '@strapi/icons/Link';
import getTrad from '../../utils/getTrad';
export const CopyLinkButton = ({ url }) => {
const publicUrl = process.env['UPLOAD_URL'] || 'https://google.com/';
const assetUrl = url.replace('/upload/', publicUrl);
const toggleNotification = useNotification();
const { formatMessage } = useIntl();
return (
<CopyToClipboard
text={assetUrl}
onCopy={() => {
toggleNotification({
type: 'success',
message: {
id: 'notification.link-copied',
defaultMessage: 'Link copied into the clipboard',
},
});
}}
>
<IconButton
label={formatMessage({
id: getTrad('control-card.copy-link'),
defaultMessage: 'Copy link',
})}
icon={<LinkIcon />}
/>
</CopyToClipboard>
);
};
CopyLinkButton.propTypes = {
url: PropTypes.string.isRequired,
};
if yes how do i rebuild my strapi to use it?
sorry in advance if I’m asking some novice/nube questions.
Looking forward to your reply.
Thank you.