Move cookie logic into cookie component

This commit is contained in:
Alicia Sykes 2023-08-13 13:59:23 +01:00
parent 9430fc7913
commit cb0143de40

View File

@ -57,8 +57,7 @@ import { determineAddressType, AddressType } from 'utils/address-type-checker';
import useMotherHook from 'hooks/motherOfAllHooks'; import useMotherHook from 'hooks/motherOfAllHooks';
import { import {
getLocation, ServerLocation, getLocation, ServerLocation,
parseCookies, Cookie, Cookie,
parseRobotsTxt,
applyWhoIsResults, Whois, applyWhoIsResults, Whois,
parseShodanResults, ShodanResults parseShodanResults, ShodanResults
} from 'utils/result-processor'; } from 'utils/result-processor';
@ -187,8 +186,7 @@ const Results = (): JSX.Element => {
updateLoadingJobs, updateLoadingJobs,
addressInfo: { address, addressType, expectedAddressTypes: urlTypeOnly }, addressInfo: { address, addressType, expectedAddressTypes: urlTypeOnly },
fetchRequest: () => fetch(`${api}/cookies?url=${address}`) fetchRequest: () => fetch(`${api}/cookies?url=${address}`)
.then(res => parseJson(res)) .then(res => parseJson(res)),
.then(res => parseCookies(res.cookies)),
}); });
// Fetch and parse crawl rules from robots.txt // Fetch and parse crawl rules from robots.txt