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:
parent
5b9e4e88b0
commit
12d6d4e8eb
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user