Skip to content

Commit

Permalink
padawan - frontend deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dcordz committed Jan 19, 2025
1 parent 1342f6d commit 88865c0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ def route_component(route)

inertia_share flash: -> { flash.to_hash }

# methods called in inertia_share must be called off of "self"
# https://github.com/inertiajs/inertia-rails/issues/4#issuecomment-538493236
inertia_share do
{
user: current_user,
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/components/admin/creator/BillCreatorBill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const BillCreatorBill = ({ setCreatorDirty }: IProps) => {
const caller = initialValues.id ? form.put : form.post;
const route = initialValues.id ? `/bills/${initialValues.id}` : "/bills";

caller(route, { preserveScroll: true });
caller(route, { preserveScroll: true, async: true });
},
[form, initialValues.id, swayLocale.id],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const BillCreatorLegislatorVotes = () => {
};
});

post("/legislator_votes", { preserveScroll: true });
post("/legislator_votes", { preserveScroll: true, async: true });
},
[bill.id, post, transform],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const BillCreatorOrganizations: React.FC = () => {
return;
}

post("/organizations", { preserveScroll: true });
post("/organizations", { preserveScroll: true, async: true });
},
[bill.id, post],
);
Expand Down
1 change: 1 addition & 0 deletions app/frontend/pages/Registration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const Registration: React.FC<IProps> = ({ user }) => {
toast.dismiss(toastId);
setLoading(false);
},
async: true,
});
},
[post],
Expand Down

0 comments on commit 88865c0

Please sign in to comment.