We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d962e43 commit 646589fCopy full SHA for 646589f
src/components/ArticleCard.tsx
@@ -156,7 +156,13 @@ const ArticleCard = ({
156
resource_id={id}
157
render={({ bookmarked, toggle }) => (
158
<button
159
- onClick={toggle}
+ onClick={() => {
160
+ if (!session?.user) {
161
+ loginPopup.show();
162
+ return;
163
+ }
164
+ toggle();
165
+ }}
166
className={clsx(
167
"transition-colors duration-300 flex cursor-pointer px-2 py-1 rounded-sm hover:bg-primary/20",
168
{ "bg-primary/20": bookmarked }
0 commit comments