diff --git a/src/components/Article/ArticleParts/InteractionButtons/ArticleInteractionButtons.tsx b/src/components/Article/ArticleParts/InteractionButtons/ArticleInteractionButtons.tsx index f2435e8..b8fd218 100755 --- a/src/components/Article/ArticleParts/InteractionButtons/ArticleInteractionButtons.tsx +++ b/src/components/Article/ArticleParts/InteractionButtons/ArticleInteractionButtons.tsx @@ -11,77 +11,85 @@ import { SVGFolder, } from "components/icons"; import classNames from "classnames"; -import { Transition } from "@headlessui/react"; -const interactionButtonsStore = [ - { - icon: , - title: "Read file", - buttonEmphasis: "high", - iconClassName: "h-6 fill-white stroke-white", - }, - { - icon: , - title: "Download", - buttonEmphasis: "low", - iconClassName: "w-6 fill-gray-900 stroke-gray-900", - }, - { - icon: , - title: "Cite", - buttonEmphasis: "low", - iconClassName: "w-6 fill-gray-900 stroke-gray-900", - }, - { - icon: , - title: "Share", - buttonEmphasis: "low", - iconClassName: "w-6 fill-gray-900 stroke-gray-900", - }, -]; +import { useArticleViewModel } from "article/controller/articleViewModel"; +import { useArticleStore } from "article/data/articleStoreImplementation"; +import { useParams } from "react-router"; +import Link from "components/typography/Link"; +import { getArticle } from "article/data/articleAPIService"; type ArticleButtonProps = { - isAbstractOpen: boolean; - openAbstract: () => void; children?: React.ReactNode; className?: string; emphasis?: "high" | "low"; } & Omit, "">; export function ArticleInteractionButtons({ - isAbstractOpen = false, children, - openAbstract = () => { }, className, - emphasis = "high", //to change displaying of component + emphasis, //to change displaying of component ...props }: ArticleButtonProps) { const abstractButton = ( - ); - + const { id } = useParams(); + const newId = `${id}`; + const interactionButtonsStore = [ + { + icon: , + title: "Read file", + buttonEmphasis: "high", + iconClassName: "h-6 fill-white stroke-white", + dist: `${newId}/anarticlebody`, + }, + { + icon: , + title: "Download", + buttonEmphasis: "low", + iconClassName: "w-6 fill-gray-900 stroke-gray-900", + }, + { + icon: , + title: "Cite", + buttonEmphasis: "low", + iconClassName: "w-6 fill-gray-900 stroke-gray-900", + }, + { + icon: , + title: "Share", + buttonEmphasis: "low", + iconClassName: "w-6 fill-gray-900 stroke-gray-900", + }, + ]; + // const fileInteractionButtons = interactionButtonsStore.map((button) => { return ( - + + ); });