Skip to content

Commit

Permalink
Removed unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Fosten committed Jul 29, 2023
1 parent 39bf5bb commit a759d6e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
8 changes: 0 additions & 8 deletions src/components/Blocks/PlantAssets/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import farmOS from '@farmOS/farmOS.js';

const View = (props) => {
const [response, setState] = useState({});
const [response2, setState2] = useState({});
const [response3, setState3] = useState({});
const [locationURL, setState4] = useState('null');
const [planttypeURL, setState5] = useState('null');

const APIlogin = () => {
const remoteConfig = {
Expand Down Expand Up @@ -55,7 +51,6 @@ const View = (props) => {
for (let count = 0; count < 13; count++) {
const locationURL =
response.data.data[count].relationships.location.links.related.href;
setState4(locationURL);
window.localStorage.setItem(
`Location${count}`,
JSON.stringify(locationURL),
Expand All @@ -70,15 +65,13 @@ const View = (props) => {
},
},
);
setState2(response2.data);
window.localStorage.setItem(
`LResponse${count}`,
JSON.stringify(response2),
);

const planttypeURL =
response.data.data[count].relationships.plant_type.links.related.href;
setState5(planttypeURL);
window.localStorage.setItem(
`Planttype${count}`,
JSON.stringify(planttypeURL),
Expand All @@ -93,7 +86,6 @@ const View = (props) => {
},
},
);
setState3(response3.data);
window.localStorage.setItem(
`PResponse${count}`,
JSON.stringify(response3),
Expand Down
4 changes: 2 additions & 2 deletions src/components/Blocks/PlantType/Sidebar.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useState } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { Segment } from 'semantic-ui-react';
import { injectIntl } from 'react-intl';
import { SelectWidget } from '@plone/volto/components';

const Sidebar = (props) => {
const { data, block, value, onChangeBlock } = props;
const { data, block, onChangeBlock } = props;

return (
<Segment.Group raised>
Expand Down
8 changes: 0 additions & 8 deletions src/components/Blocks/PlantType/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ const plantVar = [
const View = (props) => {
const { data } = props;
const [response, setState] = useState({});
const [response2, setState2] = useState({});
const [response3, setState3] = useState({});
const [locationURL, setState4] = useState('null');
const [planttypeURL, setState5] = useState('null');

const APIlogin = () => {
const remoteConfig = {
Expand Down Expand Up @@ -71,7 +67,6 @@ const View = (props) => {
for (let count = 0; count < 13; count++) {
const locationURL =
response.data.data[count].relationships.location.links.related.href;
setState4(locationURL);
window.localStorage.setItem(
`Location${count}`,
JSON.stringify(locationURL),
Expand All @@ -86,15 +81,13 @@ const View = (props) => {
},
},
);
setState2(response2.data);
window.localStorage.setItem(
`LResponse${count}`,
JSON.stringify(response2),
);

const planttypeURL =
response.data.data[count].relationships.plant_type.links.related.href;
setState5(planttypeURL);
window.localStorage.setItem(
`Planttype${count}`,
JSON.stringify(planttypeURL),
Expand All @@ -109,7 +102,6 @@ const View = (props) => {
},
},
);
setState3(response3.data);
window.localStorage.setItem(
`PResponse${count}`,
JSON.stringify(response3),
Expand Down

0 comments on commit a759d6e

Please sign in to comment.