Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit 1702fb1

Browse files
fix: disable favorite BUTTON if not logged in
1 parent 5c04dd2 commit 1702fb1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/renderer/components/Favorite/Favorite.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function Favorite({
1919
<Tooltip
2020
shouldWrapChildren
2121
label="Log in to favorite"
22-
isDisabled={!!userId}
22+
isDisabled={!!userId} // if logged in, disable the tooltip
2323
>
2424
<Button
2525
variant="unstyled"
@@ -30,6 +30,7 @@ export default function Favorite({
3030
alignItems="center"
3131
onClick={isSubscribed ? onUnsubscribe : onSubscribe}
3232
boxShadow="none !important"
33+
isDisabled={!userId} // if NOT logged in, disable the button
3334
>
3435
{isSubscribed ? (
3536
<HeartFilledIcon h="10px" w="10px" color="base.rose" />

0 commit comments

Comments
 (0)