upadte: clean code + add next cloud
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
interface ActionButtonsProps {
|
||||
isUploading: boolean
|
||||
isSecretEmpty: boolean
|
||||
noDestination: boolean
|
||||
hasPendingOrErrors: boolean
|
||||
allDone: boolean
|
||||
hasErrors: boolean
|
||||
@@ -12,6 +13,7 @@ interface ActionButtonsProps {
|
||||
export default function ActionButtons({
|
||||
isUploading,
|
||||
isSecretEmpty,
|
||||
noDestination,
|
||||
hasPendingOrErrors,
|
||||
allDone,
|
||||
hasErrors,
|
||||
@@ -19,20 +21,22 @@ export default function ActionButtons({
|
||||
onCancel,
|
||||
onReset,
|
||||
}: ActionButtonsProps) {
|
||||
const cantUpload = isSecretEmpty || noDestination
|
||||
|
||||
return (
|
||||
<div className="flex gap-3">
|
||||
{!isUploading && hasPendingOrErrors && (
|
||||
<button
|
||||
onClick={onUpload}
|
||||
disabled={isSecretEmpty}
|
||||
disabled={cantUpload}
|
||||
className={`flex-1 font-medium text-sm py-2.5 px-6 rounded-xl transition-all duration-150
|
||||
focus:outline-none focus:ring-2 focus:ring-white/50 border border-white/20
|
||||
${isSecretEmpty
|
||||
${cantUpload
|
||||
? 'bg-white/30 text-gray-500 cursor-not-allowed'
|
||||
: 'bg-white text-[#000000] hover:bg-gray-200'
|
||||
}`}
|
||||
>
|
||||
Envoyer sur GitHub
|
||||
Envoyer
|
||||
</button>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user