Skip to content

Commit

Permalink
updated types
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffcatania-usds committed Feb 19, 2025
1 parent d1ef327 commit 0d44717
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
14 changes: 1 addition & 13 deletions app/app/javascript/adapters/ModalAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
import type { RequestData, ModalAdapterArgs } from "./ModalAdapter.types.ts";

interface ModalAdapterArgs {
requestData: RequestData,
onSuccess?: Function;
onExit?: Function;
}

interface RequestData {
responseType: string;
id: string;
isDefaultOption: boolean;
providerName: string;
name: string;
}
export abstract class ModalAdapter {
requestData?: RequestData;
successCallback?: Function;
Expand Down
13 changes: 13 additions & 0 deletions app/app/javascript/adapters/ModalAdapter.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export interface ModalAdapterArgs {
requestData: RequestData;
onSuccess?: Function;
onExit?: Function;
}

export interface RequestData {
responseType: string;
id: string;
isDefaultOption: boolean;
providerName: string;
name: string;
}
5 changes: 1 addition & 4 deletions app/app/javascript/adapters/PinwheelModalAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ export default class PinwheelModalAdapter extends ModalAdapter {
}


async onSuccess(eventPayload: {
accountId: string;
platformId: string;
}) {
async onSuccess(eventPayload: LinkResult) {
await trackUserAction("PinwheelSuccess", {
account_id: eventPayload.accountId,
platform_id: eventPayload.platformId
Expand Down

0 comments on commit 0d44717

Please sign in to comment.