Skip to content

Commit

Permalink
UIIN-2634: Remove unused methods in ItemRoute component
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrHladchenko1 committed Oct 30, 2023
1 parent 181eb44 commit 15d216b
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/routes/ItemRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,8 @@ import { stripesConnect } from '@folio/stripes/core';
import withLocation from '../withLocation';
import { ItemView } from '../views';
import { DataContext } from '../contexts';
import { switchAffiliation } from '../utils';

class ItemRoute extends React.Component {
goBack = () => {
const {
match: { params: { id } },
location: { search },
history,
} = this.props;

history.push({
pathname: `/inventory/view/${id}`,
search,
});
}

onClose = () => {
const {
stripes,
location,
} = this.props;
const tenantFrom = location?.state?.tenantFrom || stripes.okapi.tenant;

switchAffiliation(stripes, tenantFrom, this.goBack);
}

render() {
const {
stripes: { okapi },
Expand All @@ -45,7 +21,6 @@ class ItemRoute extends React.Component {
<ItemView
{...this.props}
tenantTo={state?.tenantTo || okapi.tenant}
onCloseViewItem={this.onClose}
referenceTables={data}
/>
)}
Expand Down

0 comments on commit 15d216b

Please sign in to comment.