'use client'; import { Button } from '@gitroom/react/form/button'; import React, { FC } from 'react'; import { useT } from '@gitroom/react/translation/get.transation.service.client'; import { PostComment } from '@gitroom/frontend/components/new-launch/providers/high.order.provider'; export const AddPostButton: FC<{ onClick: () => void; num: number; postComment: PostComment; }> = (props) => { const { onClick, num } = props; const t = useT(); return (
{t( ...(props.postComment === PostComment.ALL ? ['add_comment_or_post', 'Add comment or post'] : props.postComment === PostComment.POST ? ['add_post', 'Add post'] : ['add_comment', 'Add comment']) )}
); };