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 { useHistory } from 'react-router';
import useToast from '../../../hooks/useToast';
import { formatApiPath } from '../../../utils/format-path';
interface ISWRProviderProps {
setShowLoader: React.Dispatch<React.SetStateAction<boolean>>;
@ -30,9 +31,9 @@ const SWRProvider: React.FC<ISWRProviderProps> = ({
}
if (
path === '/login' ||
path === '/new-user' ||
path === '/reset-password'
path === formatApiPath('login') ||
path === formatApiPath('new-user') ||
path === formatApiPath('reset-password')
) {
return;
}