Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: change
FingerprintJsProAgent
constructor interface
BREAKING CHANGE: In previous version `FingerprintJsProAgent` constructor had several position arguments. In new version it is one `params` argument of type `FingerprintJsProAgentParams`. Type `FingerprintJsProAgentParams` will be used instead of type `FingerprintJsProProviderOptions`.
- Loading branch information
Showing
6 changed files
with
40 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import React, { PropsWithChildren } from 'react' | ||
import { FingerprintJsProProvider } from '../src' | ||
import { FingerprintJsProProviderOptions } from '../src/FingerprintJsProProvider' | ||
import { FingerprintJsProAgentParams } from '../src/types' | ||
|
||
export const getDefaultLoadOptions = (): FingerprintJsProProviderOptions => ({ | ||
export const getDefaultLoadOptions = (): FingerprintJsProAgentParams => ({ | ||
apiKey: 'test_api_key', | ||
}) | ||
|
||
export const createWrapper = | ||
(loadOptions: FingerprintJsProProviderOptions = getDefaultLoadOptions()) => | ||
(loadOptions: FingerprintJsProAgentParams = getDefaultLoadOptions()) => | ||
({ children }: PropsWithChildren<{}>): JSX.Element => | ||
<FingerprintJsProProvider {...loadOptions}>{children}</FingerprintJsProProvider> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters