1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-31 01:16:01 +02:00

Change fetcher in OSS chang (#2518)

This commit is contained in:
Mateusz Kwasniewski 2022-11-24 09:52:36 +01:00 committed by GitHub
parent 6e2351edeb
commit da59354bb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ export const useChangeRequestConfig = (projectId: string) => {
const { isOss } = useUiConfig();
const { data, error, mutate } = useSWR<IChangeRequestEnvironmentConfig[]>(
formatApiPath(`api/admin/projects/${projectId}/change-requests/config`),
isOss() ? () => Promise.resolve([]) : fetcher
(path: string) => (isOss() ? Promise.resolve([]) : fetcher(path))
);
return {

View File

@ -14,7 +14,7 @@ export const usePendingChangeRequests = (project: string) => {
const { isOss } = useUiConfig();
const { data, error, mutate } = useSWR<IChangeRequest[]>(
formatApiPath(`api/admin/projects/${project}/change-requests/pending`),
isOss() ? () => Promise.resolve([]) : fetcher
(path: string) => (isOss() ? Promise.resolve([]) : fetcher(path))
);
return {