forked from nodejs/nodejs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDetailsButton.tsx
More file actions
30 lines (23 loc) · 737 Bytes
/
DetailsButton.tsx
File metadata and controls
30 lines (23 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'use client';
import { useTranslations } from 'next-intl';
import type { FC } from 'react';
import { use } from 'react';
import LinkWithArrow from '@/components/LinkWithArrow';
import { ReleaseModalContext } from '@/providers/releaseModalProvider';
import type { NodeRelease } from '@/types';
type DetailsButtonProps = {
versionData: NodeRelease;
};
const DetailsButton: FC<DetailsButtonProps> = ({ versionData }) => {
const t = useTranslations('components.downloadReleasesTable');
const { openModal } = use(ReleaseModalContext);
return (
<LinkWithArrow
className="cursor-pointer"
onClick={() => openModal(versionData)}
>
{t('details')}
</LinkWithArrow>
);
};
export default DetailsButton;