Commit 0073c2ba authored by Magnus Westergaard's avatar Magnus Westergaard
Browse files

DEICH-5651: Add publication parts (rename and reuse old component, for now).

parent 2f8f2caf
......@@ -5,7 +5,7 @@ import { Accordion, Block, Sorter, Table } from "@digibib/deichman-ui";
import "./styles.css";
class WorkParts extends React.Component {
class PublicationParts extends React.Component {
constructor(props) {
super(props);
autoBind(this);
......@@ -158,9 +158,9 @@ class WorkParts extends React.Component {
}
}
WorkParts.propTypes = {
PublicationParts.propTypes = {
publicationId: PropTypes.string.isRequired,
data: PropTypes.object.isRequired
};
export default WorkParts;
export default PublicationParts;
import React from "react";
import PropTypes from "prop-types";
import PublicationParts from "./PublicationParts";
import { Block } from "@digibib/deichman-ui";
export default function PublicationPartsAccordion({ publication }) {
const { work, id } = publication;
return (
<Block top={8}>
<PublicationParts data={work} publicationId={id} />
</Block>
);
}
PublicationPartsAccordion.propTypes = {
publication: PropTypes.object.isRequired
};
import PublicationPartsAccordion from "./PublicationPartsAccordion";
export default PublicationPartsAccordion;
import React from "react";
import { Accordion, Block } from "@digibib/deichman-ui";
// import WorkParts from "./WorkParts";
export default function WorkPartsAccordionContainer({ publicationId }) {
return (
<Block top={8}>
<Accordion text="Innhold" openByDefault large showDividers>
<div>TODO IMPLEMENT ME</div>
{/* <WorkParts data={workData} publicationId={publicationId} /> */}
</Accordion>
</Block>
);
}
import WorkParts from "./WorkParts";
export default WorkParts;
......@@ -12,7 +12,7 @@ import TabPane from "../../components/TabPane";
import { translations } from "../../constants/translations";
import RecommendationAccordion from "../../components/RecommendationAccordion/RecommendationAccordion";
import WorkDetailsAccordionContainer from "../../components/WorkDetails/WorkDetailsAccordionContainer";
import WorkPartsAccordionContainer from "../../components/WorkParts/WorkPartsAccordionContainer";
import PublicationPartsAccordion from "../../components/PublicationParts";
import WorkHeroContainer from "../../components/WorkHero/WorkHeroContainer";
import PublicationAccordionContainer from "../../components/PublicationList/PublicationAccordionContainer";
import PublicationRelatedContent from "../../components/PublicationRelatedContent/PublicationRelatedContent";
......@@ -106,7 +106,7 @@ class PublicationPage extends React.Component {
<Container color="gray" preventCollapse>
<RecommendationAccordion recommendations={recommendations} />
<WorkDetailsAccordionContainer publication={publication} />
<WorkPartsAccordionContainer />
<PublicationPartsAccordion publication={publication} />
<PublicationAccordionContainer />
</Container>
<Container>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment