diff --git a/.pnp.cjs b/.pnp.cjs index ba383b6..3c1f3e9 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -39,7 +39,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@semantic-release/git", "virtual:966f01ca8afb3964ded04b60291d5aa24ec9555db4efd16e175f58f0f4e23254e1dfcd91d0b19320ae8610edb9b8231d04df35e84e3dd8af4637b643069076da#npm:10.0.1"],\ ["@semantic-release/github", "virtual:c91fcd356d35829ced3f9cafcb7d70217b01982491547be46dbf92a34cc1c6f47f5022ecefa553004a9375335550e06b2a45e10dc96f6aba8aa030dc26a07d30#npm:8.0.5"],\ ["@types/prop-types", "npm:15.7.5"],\ - ["@types/react", "npm:17.0.3"],\ + ["@types/react", "npm:18.0.15"],\ ["@typescript-eslint/eslint-plugin", "virtual:966f01ca8afb3964ded04b60291d5aa24ec9555db4efd16e175f58f0f4e23254e1dfcd91d0b19320ae8610edb9b8231d04df35e84e3dd8af4637b643069076da#npm:5.30.6"],\ ["@typescript-eslint/parser", "virtual:966f01ca8afb3964ded04b60291d5aa24ec9555db4efd16e175f58f0f4e23254e1dfcd91d0b19320ae8610edb9b8231d04df35e84e3dd8af4637b643069076da#npm:5.30.6"],\ ["eslint", "npm:8.19.0"],\ @@ -100,7 +100,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@semantic-release/git", "virtual:966f01ca8afb3964ded04b60291d5aa24ec9555db4efd16e175f58f0f4e23254e1dfcd91d0b19320ae8610edb9b8231d04df35e84e3dd8af4637b643069076da#npm:10.0.1"],\ ["@semantic-release/github", "virtual:c91fcd356d35829ced3f9cafcb7d70217b01982491547be46dbf92a34cc1c6f47f5022ecefa553004a9375335550e06b2a45e10dc96f6aba8aa030dc26a07d30#npm:8.0.5"],\ ["@types/prop-types", "npm:15.7.5"],\ - ["@types/react", "npm:17.0.3"],\ + ["@types/react", "npm:18.0.15"],\ ["@typescript-eslint/eslint-plugin", "virtual:966f01ca8afb3964ded04b60291d5aa24ec9555db4efd16e175f58f0f4e23254e1dfcd91d0b19320ae8610edb9b8231d04df35e84e3dd8af4637b643069076da#npm:5.30.6"],\ ["@typescript-eslint/parser", "virtual:966f01ca8afb3964ded04b60291d5aa24ec9555db4efd16e175f58f0f4e23254e1dfcd91d0b19320ae8610edb9b8231d04df35e84e3dd8af4637b643069076da#npm:5.30.6"],\ ["eslint", "npm:8.19.0"],\ @@ -1185,10 +1185,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["@types/react", [\ - ["npm:17.0.3", {\ - "packageLocation": "./.yarn/cache/@types-react-npm-17.0.3-dc5fdac36f-d29f2a33ed.zip/node_modules/@types/react/",\ + ["npm:18.0.15", {\ + "packageLocation": "./.yarn/cache/@types-react-npm-18.0.15-5275c78b86-e22cc388d1.zip/node_modules/@types/react/",\ "packageDependencies": [\ - ["@types/react", "npm:17.0.3"],\ + ["@types/react", "npm:18.0.15"],\ ["@types/prop-types", "npm:15.7.3"],\ ["@types/scheduler", "npm:0.16.1"],\ ["csstype", "npm:3.0.7"]\ diff --git a/.yarn/cache/@types-react-npm-17.0.3-dc5fdac36f-d29f2a33ed.zip b/.yarn/cache/@types-react-npm-17.0.3-dc5fdac36f-d29f2a33ed.zip deleted file mode 100644 index 1756ae5..0000000 Binary files a/.yarn/cache/@types-react-npm-17.0.3-dc5fdac36f-d29f2a33ed.zip and /dev/null differ diff --git a/.yarn/cache/@types-react-npm-18.0.15-5275c78b86-e22cc388d1.zip b/.yarn/cache/@types-react-npm-18.0.15-5275c78b86-e22cc388d1.zip new file mode 100644 index 0000000..c6fe547 Binary files /dev/null and b/.yarn/cache/@types-react-npm-18.0.15-5275c78b86-e22cc388d1.zip differ diff --git a/package.json b/package.json index 601472e..e9adb40 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@semantic-release/git": "^10.0.1", "@semantic-release/github": "^8.0.5", "@types/prop-types": "15.7.5", - "@types/react": "^17.0.3", + "@types/react": "^18.0.15", "@typescript-eslint/eslint-plugin": "^5.30.6", "@typescript-eslint/parser": "^5.30.6", "eslint": "^8.19.0", diff --git a/src/provider/ChatProvider.tsx b/src/provider/ChatProvider.tsx index 2b06cb2..8ad2ea7 100644 --- a/src/provider/ChatProvider.tsx +++ b/src/provider/ChatProvider.tsx @@ -6,7 +6,7 @@ import React, { useRef, useState, } from "react"; -import type { ReactChild, ReactChildren } from "react"; +import type { ReactNode } from "react"; import type { ChatServiceFactory, ChatState, @@ -277,7 +277,7 @@ export interface ChatProviderProps { serviceFactory: ChatServiceFactory; storage: IStorage; config: ChatProviderConfig; - children?: ReactChild | ReactChildren; + children?: ReactNode; } /** @@ -347,9 +347,10 @@ export const ChatProvider = ({ * Get user by id * @param userId */ - const getUser = useCallback((userId: UserId) => storage.getUser(userId)[0], [ - storage, - ]); + const getUser = useCallback( + (userId: UserId) => storage.getUser(userId)[0], + [storage] + ); /** * Set active conversation diff --git a/yarn.lock b/yarn.lock index 195b631..0bf35e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -42,7 +42,7 @@ __metadata: "@semantic-release/git": ^10.0.1 "@semantic-release/github": ^8.0.5 "@types/prop-types": 15.7.5 - "@types/react": ^17.0.3 + "@types/react": ^18.0.15 "@typescript-eslint/eslint-plugin": ^5.30.6 "@typescript-eslint/parser": ^5.30.6 eslint: ^8.19.0 @@ -931,14 +931,14 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:^17.0.3": - version: 17.0.3 - resolution: "@types/react@npm:17.0.3" +"@types/react@npm:^18.0.15": + version: 18.0.15 + resolution: "@types/react@npm:18.0.15" dependencies: "@types/prop-types": "*" "@types/scheduler": "*" csstype: ^3.0.2 - checksum: d29f2a33ed69fae9d9f42f8b39b40352e3209eb821f827d566330adfdffb48d2dc730982356cd50a7fda6171e6bc7deca793f7b105c95fce615a45ab313ecf41 + checksum: e22cc388d1c145aa184787e44dc28db4789976c704cd5db475c170bb76a560eb81def5f346cfe750949bb3d43ad88822b8cbb9f19b1286e3795892a8263e7715 languageName: node linkType: hard