@cs124/client-id
Advanced tools
Comparing version 2021.7.0 to 2021.7.1
import React from "react"; | ||
export interface ClientIDProviderProps { | ||
IPinterval?: number; | ||
} | ||
export interface ClientIDContext { | ||
@@ -9,4 +12,4 @@ browserID?: string; | ||
export declare const ClientIDContext: React.Context<ClientIDContext>; | ||
export declare const ClientIDProvider: React.FC; | ||
export declare const ClientIDProvider: React.FC<ClientIDProviderProps>; | ||
export declare const useClientID: () => ClientIDContext; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -32,3 +32,3 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
}); | ||
const ClientIDProvider = ({ children }) => { | ||
const ClientIDProvider = ({ IPinterval = 5 * 6 * 1000, children }) => { | ||
const [browserID, setBrowserID] = react_1.useState(); | ||
@@ -67,3 +67,3 @@ react_1.useEffect(() => { | ||
}; | ||
const timer = setInterval(() => checkIP, 5 * 6 * 1000); | ||
const timer = setInterval(() => checkIP, IPinterval); | ||
checkIP(); | ||
@@ -73,3 +73,3 @@ return () => { | ||
}; | ||
}, [setIPv4, setIPv6]); | ||
}, [IPinterval, setIPv4, setIPv6]); | ||
return react_1.default.createElement(exports.ClientIDContext.Provider, { value: { browserID, tabID, IPv4, IPv6 } }, children); | ||
@@ -76,0 +76,0 @@ }; |
{ | ||
"name": "@cs124/client-id", | ||
"version": "2021.7.0", | ||
"version": "2021.7.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9563
174