import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/react"; import type { PostFragment } from "@hey/indexer"; import { AnimateNumber } from "motion-plus-react"; import { TipIcon } from "@/components/Shared/Icons/TipIcon"; import MenuTransition from "@/components/Shared/MenuTransition"; import TipMenu from "@/components/Shared/TipMenu"; import { Tooltip } from "@/components/Shared/UI"; import cn from "@/helpers/cn"; import stopEventPropagation from "@/helpers/stopEventPropagation"; interface TipActionProps { post: PostFragment; showCount: boolean; } const TipAction = ({ post, showCount }: TipActionProps) => { const hasTipped = post.operations?.hasTipped; const { tips } = post.stats; const iconClassName = showCount ? "w-[17px] sm:w-[20px]" : "w-[15px] sm:w-[18px]"; return (
{({ close }) => } {(tips || 0) > 0 && !showCount && ( {tips || 0} )}
); }; export default TipAction;