Skip to content

Commit d1cedce

Browse files
committed
feat: props types in the PaperButtons component
1 parent 36f2b85 commit d1cedce

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

vis/js/templates/listentry/PaperButtons.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
1-
import React from "react";
1+
import React, { FC } from "react";
22
import { connect } from "react-redux";
33

44
import useMatomo from "../../utils/useMatomo";
55
import { getPaperPDFClickHandler } from "../../utils/data";
66
import { mapDispatchToListEntriesProps } from "../../utils/eventhandlers";
77
import Highlight from "../../components/Highlight";
88
import { isNonTextDocument } from "../Paper";
9+
import { Paper } from "../../@types/paper";
910

10-
const PaperButtons: React.FC<any> = ({
11+
// TODO: Update type for paper with new ones after merge (using union type)
12+
interface PaperButtonsProps {
13+
paper: Paper;
14+
showCiteButton: boolean;
15+
showExportButton: boolean;
16+
noCitationDoctypes: string[];
17+
handlePDFClick: (paper: Paper) => void;
18+
handleCiteClick: (paper: Paper) => void;
19+
handleExportClick: (paper: Paper) => void;
20+
}
21+
22+
const PaperButtons: FC<PaperButtonsProps> = ({
1123
paper,
1224
showCiteButton,
1325
noCitationDoctypes,

0 commit comments

Comments
 (0)