Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DmytroHryshyn committed Aug 7, 2024
1 parent 8ff9a28 commit 625a716
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const useExecutionStatus = ({
response?.result?.status === "done" ||
response?.result?.status === "error";

console.log(isExecutionFinalized, response);
if (isExecutionFinalized) {
if (response?.result) showStatusToast(response.result);
clearInterval(_intervalId);
Expand Down
8 changes: 3 additions & 5 deletions apps/frontend/app/(website)/studio/src/hooks/useAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const shouldUseMocks =
Boolean(localStorage?.getItem("useMocks"));

export const useAPI = <T>(endpoint: string) => {
useMirageServer(true);
useMirageServer(shouldUseMocks);

const { getToken } = useAuth();
const getHeaders = async () => {
Expand All @@ -27,9 +27,7 @@ export const useAPI = <T>(endpoint: string) => {
await apiClient.get<U>(endpoint, await getHeaders()),
put: async <U = T>(body: U) =>
await apiClient.put<U>(endpoint, body, await getHeaders()),
post: async <U, K = T>(body: U) => {
console.log("HERE", endpoint, body, "????");
return await apiClient.post<K>(endpoint, body, await getHeaders());
},
post: async <U, K = T>(body: U) =>
await apiClient.post<K>(endpoint, body, await getHeaders()),
};
};
2 changes: 0 additions & 2 deletions apps/frontend/mirage/endpoints/campaign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ export const campaignEndpoints = (server: Server<AppRegistry>) => {
return new Response(404, {}, { error: "Not found" });
}

console.log(campaign, "???");

return campaign.dashboard;
});
};

0 comments on commit 625a716

Please sign in to comment.