bb-plane-fork/apps/space/components/issues/peek-overview/issue-reaction.tsx
sriram veeraghanta 7fb6696c67
chore: space folders (#8707)
* chore: change the space folders structure

* fix: format
2026-03-05 14:03:54 +05:30

39 lines
1.1 KiB
TypeScript

/**
* Copyright (c) 2023-present Plane Software, Inc. and contributors
* SPDX-License-Identifier: AGPL-3.0-only
* See the LICENSE file for details.
*/
import { observer } from "mobx-react";
// components
import { IssueEmojiReactions } from "@/components/issues/reactions/issue-emoji-reactions";
import { IssueVotes } from "@/components/issues/reactions/issue-vote-reactions";
// hooks
import { usePublish } from "@/hooks/store/publish";
import useIsInIframe from "@/hooks/use-is-in-iframe";
type Props = {
anchor: string;
};
export const IssueReactions = observer(function IssueReactions(props: Props) {
const { anchor } = props;
// store hooks
const { canVote, canReact } = usePublish(anchor);
const isInIframe = useIsInIframe();
return (
<div className="mt-4 flex items-center gap-3">
{canVote && (
<div className="flex items-center gap-2">
<IssueVotes anchor={anchor} />
</div>
)}
{!isInIframe && canReact && (
<div className="flex items-center gap-2">
<IssueEmojiReactions anchor={anchor} />
</div>
)}
</div>
);
});