1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: format api paths (#655)

This commit is contained in:
Fredrik Strand Oseberg 2022-02-02 00:25:00 +01:00 committed by GitHub
parent 5b9e4e88b0
commit 12d6d4e8eb

View File

@ -2,6 +2,7 @@ import { USER_CACHE_KEY } from '../../../hooks/api/getters/useUser/useUser';
import { mutate, SWRConfig, useSWRConfig } from 'swr'; import { mutate, SWRConfig, useSWRConfig } from 'swr';
import { useHistory } from 'react-router'; import { useHistory } from 'react-router';
import useToast from '../../../hooks/useToast'; import useToast from '../../../hooks/useToast';
import { formatApiPath } from '../../../utils/format-path';
interface ISWRProviderProps { interface ISWRProviderProps {
setShowLoader: React.Dispatch<React.SetStateAction<boolean>>; setShowLoader: React.Dispatch<React.SetStateAction<boolean>>;
@ -30,9 +31,9 @@ const SWRProvider: React.FC<ISWRProviderProps> = ({
} }
if ( if (
path === '/login' || path === formatApiPath('login') ||
path === '/new-user' || path === formatApiPath('new-user') ||
path === '/reset-password' path === formatApiPath('reset-password')
) { ) {
return; return;
} }