Skip to content

Commit

Permalink
Rename mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
ZIJ committed Sep 6, 2024
1 parent b5ec570 commit ad1538f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useSAToastMutation } from "@/hooks/useSAToastMutation";

export function TriggerApplyButton({ projectId }: { projectId: string }) {

const updateProjectSettingsMutation = useSAToastMutation(
const triggerApplyMutation = useSAToastMutation(
async () => {
const result = await triggerApplyAction({
projectId: projectId,
Expand All @@ -22,7 +22,7 @@ export function TriggerApplyButton({ projectId }: { projectId: string }) {

const onClick = async () => {
try {
await updateProjectSettingsMutation.mutateAsync();
await triggerApplyMutation.mutateAsync();
} catch (error) {
console.error("Error updating project settings:", error);
}
Expand Down
4 changes: 2 additions & 2 deletions src/data/user/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,8 @@ export async function triggerApplyAction({ projectId }: { projectId: string }):

const user = await serverGetLoggedInUser();
const payload = {
userId: user.id,
projectId
user_id: user.id,
project_id: projectId,
}
const response = await fetch(
triggerApplyUrl,
Expand Down

0 comments on commit ad1538f

Please sign in to comment.