Skip to main content
Glama
Southclaws

Storyden

by Southclaws
LikeButton.tsx1.44 kB
import { LikeAction } from "@/components/site/Action/Like"; import { Button } from "@/components/ui/button"; import { LikeIcon, LikeSavedIcon } from "@/components/ui/icons/Like"; import { styled } from "@/styled-system/jsx"; import { Props, useLikeButton } from "./useLikeButton"; type LikeButtonProps = Props & { showCount?: boolean; }; export function LikeButton({ showCount = false, ...props }: LikeButtonProps) { const { handleClick } = useLikeButton({ thread: props.thread }); const likeCount = props.thread.likes.likes; if (showCount) { return ( <Button type="button" variant="subtle" display="flex" size="xs" gap="1" color="fg.muted" aria-label={props.thread.likes.liked ? "Unlike" : "Like"} title={props.thread.likes.liked ? "Unlike" : "Like"} onClick={handleClick} > <span> {props.thread.likes.liked ? ( <LikeSavedIcon width="4" /> ) : ( <LikeIcon width="4" /> )} </span> <styled.span fontSize="sm" fontWeight="medium" fontVariantNumeric="tabular-nums" fontVariant="tabular-nums" > {likeCount} </styled.span> </Button> ); } return ( <LikeAction variant="subtle" size="xs" liked={props.thread.likes.liked} onClick={handleClick} /> ); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Southclaws/storyden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server