Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
floodfx committed Feb 8, 2022
1 parent cdd71cf commit 1f2e5cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/examples/volunteers/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export class VolunteerComponent extends BaseLiveViewComponent<VolunteerContext,

handleEvent(event: VolunteerEvents, params: StringPropertyValues<Pick<Volunteer, "name" | "phone" | "id">>, socket: LiveViewSocket<VolunteerContext>): VolunteerContext {
if (event === "toggle-status") {
// lookup volunteer by id
const volunteer = getVolunteer(params.id);
// toggle checked_out status (ignoring changeset for now)
updateVolunteer(volunteer!, { checked_out: !volunteer!.checked_out });
return {
volunteers: listVolunteers(),
Expand Down

0 comments on commit 1f2e5cf

Please sign in to comment.