diff --git a/components/RaidDropdown/index.tsx b/components/RaidDropdown/index.tsx index 208af245..47ad6b26 100644 --- a/components/RaidDropdown/index.tsx +++ b/components/RaidDropdown/index.tsx @@ -1,5 +1,4 @@ import React, { useCallback, useEffect, useState } from 'react' -import { useCookies } from 'react-cookie' import { appState } from '~utils/appState' import api from '~utils/api' @@ -15,7 +14,6 @@ interface Props { } const RaidDropdown = React.forwardRef(function useFieldSet(props, ref) { - const [cookies] = useCookies(['user']) const [raids, setRaids] = useState() const raidGroups = [ @@ -50,12 +48,8 @@ const RaidDropdown = React.forwardRef(function useFiel }, [props.allOption]) useEffect(() => { - const headers = (cookies.user != null) ? { - headers: { 'Authorization': `Bearer ${cookies.user.access_token}` } - } : {} - function fetchRaids() { - api.endpoints.raids.getAll(headers) + api.endpoints.raids.getAll() .then((response) => { const raids = response.data.map((r: any) => r.raid) @@ -65,7 +59,7 @@ const RaidDropdown = React.forwardRef(function useFiel } fetchRaids() - }, [cookies.user, organizeRaids]) + }, [organizeRaids]) function raidGroup(index: number) { const options = raids && raids.length > 0 && raids[index].length > 0 &&