Skip to content

Commit

Permalink
refactor: make callback just a string
Browse files Browse the repository at this point in the history
  • Loading branch information
cngonzalez committed Nov 6, 2023
1 parent f0f5891 commit 7e6f55a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/TranslationContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type ContextProps = {
secrets: Secrets
workflowOptions?: WorkflowIdentifiers[]
localeIdAdapter?: (id: string) => string | Promise<string>
callbackUrl?: (serializedDocument: SerializedDocument) => string
callbackUrl?: string
}

export const TranslationContext = React.createContext<ContextProps | null>(null)
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface Adapter {
localeIds: string[],
secrets: Secrets | null,
workflowUid?: string,
callbackUrl?: (document: SerializedDocument) => string,
callbackUrl?: string,
) => Promise<TranslationTask>
getTranslation: (taskid: string, localeId: string, secrets: Secrets | null) => Promise<any | null>
}
Expand Down Expand Up @@ -96,5 +96,5 @@ export type TranslationsTabConfigOptions = {
workflowOptions?: WorkflowIdentifiers[]
localeIdAdapter?: (id: string) => string
languageField?: string
callbackUrl?: (document: SerializedDocument) => string
callbackUrl?: string
}

0 comments on commit 7e6f55a

Please sign in to comment.