mirror of
https://github.com/skidoodle/erettsegi-browser.git
synced 2025-02-15 05:39:15 +01:00
xd
This commit is contained in:
@@ -29,11 +29,14 @@ const CustomButton: React.FC<ButtonProps> = ({ label, link }) => {
|
||||
}, [link])
|
||||
|
||||
const getColor = (): ButtonColor => {
|
||||
if (status === 200) {
|
||||
switch (true) {
|
||||
case isLoading:
|
||||
return 'default'
|
||||
case status === 200:
|
||||
return 'primary'
|
||||
} else if (status === 404) {
|
||||
case status === 404:
|
||||
return 'danger'
|
||||
} else {
|
||||
default:
|
||||
return 'default'
|
||||
}
|
||||
}
|
||||
@@ -50,7 +53,7 @@ const CustomButton: React.FC<ButtonProps> = ({ label, link }) => {
|
||||
<Button
|
||||
isDisabled={status !== 200 || !link || isLoading}
|
||||
isLoading={isLoading}
|
||||
className='w-24 mt-3 text-sm font-bold py-2 px-2'
|
||||
className='w-28 mt-3 text-sm font-bold py-2 px-2'
|
||||
color={getColor()}
|
||||
onClick={handleClick}
|
||||
>
|
||||
|
Reference in New Issue
Block a user