Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cord-sdk/react

Package Overview
Dependencies
Maintainers
3
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cord-sdk/react - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

5

dist/contexts/CordContext.d.ts

@@ -10,8 +10,7 @@ import React from 'react';

declare type Props = {
sessionToken?: string | undefined | null;
clientAuthToken?: string | undefined | null;
clientAuthToken: string | undefined | null;
enableTasks?: boolean;
cordScriptUrl?: string;
};
export declare function CordProvider({ sessionToken, clientAuthToken, enableTasks, cordScriptUrl, children, }: React.PropsWithChildren<Props>): JSX.Element;
export declare function CordProvider({ clientAuthToken, enableTasks, cordScriptUrl, children, }: React.PropsWithChildren<Props>): JSX.Element;
export {};

1

dist/hooks/useCustomEventListener.d.ts

@@ -1,4 +0,3 @@

/// <reference types="react" />
export declare function useCustomEventListeners<T extends Record<string, unknown[]>>(events: {
[P in keyof T]: ((...args: T[P]) => unknown) | undefined;
}): import("react").Dispatch<import("react").SetStateAction<Element | null>>;

@@ -79,3 +79,3 @@ 'use strict';

function CordProvider(_a) {
var sessionToken = _a.sessionToken, clientAuthToken = _a.clientAuthToken, enableTasks = _a.enableTasks, cordScriptUrl = _a.cordScriptUrl, children = _a.children;
var clientAuthToken = _a.clientAuthToken, enableTasks = _a.enableTasks, cordScriptUrl = _a.cordScriptUrl, children = _a.children;
var _b = React.useState(null), sdk = _b[0], setSDK = _b[1];

@@ -106,6 +106,8 @@ var _c = React.useState(), context = _c[0], setContext = _c[1];

React.useEffect(function () {
if (sdk && (sessionToken || clientAuthToken)) {
var token = clientAuthToken || sessionToken;
if (sdk && clientAuthToken) {
sdk
.init({ client_auth_token: token, enable_tasks: enableTasks })
.init({
client_auth_token: clientAuthToken,
enable_tasks: enableTasks,
})
.then(function () {

@@ -121,3 +123,3 @@ setSDK(sdk);

}
}, [sdk, sessionToken, clientAuthToken, enableTasks]);
}, [sdk, clientAuthToken, enableTasks]);
var value = React.useMemo(function () { return ({ sdk: sdk, context: context, setContext: setContext }); }, [sdk, context, setContext]);

@@ -124,0 +126,0 @@ return React__default["default"].createElement(CordContext.Provider, { value: value }, children);

{
"name": "@cord-sdk/react",
"version": "0.0.2",
"version": "0.0.3",
"homepage": "https://docs.cord.com/",

@@ -5,0 +5,0 @@ "license": "MIT",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc