Commit 05d352c0 authored by David Björkheim's avatar David Björkheim
Browse files

DEICH-5554 Deichman.no: Remove unused imports

parent eb70a377
......@@ -9,20 +9,14 @@ import {
inlineResultsSelector,
hideSearchOverlay
} from "../../store/search";
import {
toggleFavourites,
toggleReservations,
unfreezeBody
} from "../../store/application";
import { toggleFavourites, unfreezeBody } from "../../store/application";
import { extractIdFromSlug } from "../../utilities/slug";
import Head from "../../components/Head";
import FullScreen from "../../components/FullScreen";
import SerialHero from "../../components/SerialHero";
import ReservationsManager from "../../components/ReservationsManager";
import WorkGrid from "../../components/WorkGrid";
import PublicationDetailsManager from "../../components/PublicationDetailsManager";
import SerialPreview from "../../components/SerialPreview";
import {
Block,
......@@ -216,9 +210,6 @@ class SerialPage extends React.Component {
</Block>
</Container>
)}
<PublicationDetailsManager />
<ReservationsManager />
</Fragment>
);
}
......@@ -231,7 +222,6 @@ SerialPage.propTypes = {
results: PropTypes.object.isRequired,
favourites: PropTypes.array.isRequired,
toggleFavourites: PropTypes.func.isRequired,
toggleReservations: PropTypes.func.isRequired,
hideSearchOverlay: PropTypes.func.isRequired,
unfreezeBody: PropTypes.func.isRequired,
overlayVisible: PropTypes.bool.isRequired,
......@@ -262,7 +252,6 @@ function mapStateToProps(state) {
function mapDispatchToProps(dispatch) {
return {
toggleFavourites: data => dispatch(toggleFavourites(data)),
toggleReservations: data => dispatch(toggleReservations(data)),
hideSearchOverlay: () => dispatch(hideSearchOverlay()),
unfreezeBody: () => dispatch(unfreezeBody())
};
......
......@@ -3,11 +3,7 @@ import { connect } from "react-redux";
import PropTypes from "prop-types";
import { getCorporation } from "../../store/agent";
import {
toggleFavourites,
toggleReservations,
unfreezeBody
} from "../../store/application";
import { toggleFavourites, unfreezeBody } from "../../store/application";
import { hideSearchOverlay } from "../../store/search";
import { extractIdFromSlug } from "../../utilities/slug";
......@@ -93,7 +89,6 @@ function mapStateToProps(state) {
function mapDispatchToProps(dispatch) {
return {
toggleFavourites: data => dispatch(toggleFavourites(data)),
toggleReservations: data => dispatch(toggleReservations(data)),
hideSearchOverlay: () => dispatch(hideSearchOverlay()),
unfreezeBody: () => dispatch(unfreezeBody())
};
......
......@@ -3,11 +3,7 @@ import { connect } from "react-redux";
import PropTypes from "prop-types";
import { getPerson } from "../../store/agent";
import {
toggleFavourites,
toggleReservations,
unfreezeBody
} from "../../store/application";
import { toggleFavourites, unfreezeBody } from "../../store/application";
import { hideSearchOverlay } from "../../store/search";
import { extractIdFromSlug } from "../../utilities/slug";
......@@ -93,7 +89,6 @@ function mapStateToProps(state) {
function mapDispatchToProps(dispatch) {
return {
toggleFavourites: data => dispatch(toggleFavourites(data)),
toggleReservations: data => dispatch(toggleReservations(data)),
hideSearchOverlay: () => dispatch(hideSearchOverlay()),
unfreezeBody: () => dispatch(unfreezeBody())
};
......
......@@ -4,11 +4,7 @@ import autoBind from "auto-bind";
import { connect } from "react-redux";
import { getWorkSeries } from "../../store/resources";
import {
toggleFavourites,
toggleReservations,
unfreezeBody
} from "../../store/application";
import { toggleFavourites, unfreezeBody } from "../../store/application";
import { hideSearchOverlay } from "../../store/search";
import { extractIdFromSlug } from "../../utilities/slug";
......@@ -242,7 +238,6 @@ function mapStateToProps(state) {
function mapDispatchToProps(dispatch) {
return {
toggleFavourites: data => dispatch(toggleFavourites(data)),
toggleReservations: data => dispatch(toggleReservations(data)),
hideSearchOverlay: () => dispatch(hideSearchOverlay()),
unfreezeBody: () => dispatch(unfreezeBody())
};
......
......@@ -7,7 +7,6 @@ import { getPublication } from "../../store/resources";
import Head from "../../components/Head";
import FullScreen from "../../components/FullScreen";
import ReservationsManager from "../../components/ReservationsManager";
import PublicationDetailsManager from "../../components/PublicationDetailsManager";
import { Block, Container, Loader, Text } from "@digibib/deichman-ui";
import TabPane from "../../components/TabPane";
......@@ -53,7 +52,7 @@ class PublicationPage extends React.Component {
overrides: {
...this.state.overrides,
[`${translations[publication.mediaType]}${encodeURIComponent(
publication.languages[0]
publication.languages?.[0]
)}`]: publication.id
}
});
......@@ -115,7 +114,6 @@ class PublicationPage extends React.Component {
</Container>
{/*Should the components below still be included here? Why is the visibility state in redux? */}
<PublicationDetailsManager query={query} />
<ReservationsManager />
</>
</WorkPageWrapper>
</Fragment>
......@@ -160,7 +158,9 @@ function WorkPageWrapper({
let tab = tabIds[index];
const override =
tabOverrides[
`${tab.mediaType}${encodeURIComponent(currentPublication.languages[0])}`
`${tab.mediaType}${encodeURIComponent(
currentPublication.languages?.[0]
)}`
];
if (override) {
tab = { id: override };
......
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