Skip to content

Commit

Permalink
delete
Browse files Browse the repository at this point in the history
  • Loading branch information
BelousSofiya committed Nov 2, 2023
1 parent 8feea0d commit 0f7db11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
15 changes: 1 addition & 14 deletions FrontEnd/src/components/SearchPage/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,7 @@ export function Search({ isAuthorized }) {
const searchUrl = 'search';
const { mutate } = useSWRConfig();

const fetcher = (url) =>
axios
.get(url)
.then((res) => res.data)
.catch(function (error) {
if (error.response) {
console.log(error.response.data);
} else if (error.request) {
console.log(error.request);
} else {
console.log('Error', error.message);
}
console.log(error.config);
});
const fetcher = (url) => axios.get(url).then((res) => res.data);

async function getRequest(url) {
const data = await fetcher(url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,8 @@ const CompanyCard = ({ companyData, isAuthorized }) => {
})
.then((response) => {
return response.data;
})
.catch(function (error) {
if (error.response) {
console.log(error.response.data);
} else if (error.request) {
console.log(error.request);
} else {
console.log('Error', error.message);
}
});

const NewList = [];
for (let item of data.results) {
NewList.push(item['id']);
Expand Down

0 comments on commit 0f7db11

Please sign in to comment.