Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbui1995 committed Oct 4, 2023
1 parent ead383f commit b79989c
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 27 deletions.
3 changes: 2 additions & 1 deletion examples/full-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-sipjs-client": "^0.0.3"
"react-sipjs": "^0.0.3"
},
"devDependencies": {
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.3",
"@tailwindcss/forms": "^0.5.6",
"autoprefixer": "^10.4.16",
"eslint": "^8.45.0",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/full-example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SIPProvider } from "../../../src/sip-provider";
import { SIPProvider } from "react-sipjs";
import { CallCenter } from "./CallCenter";

function App() {
Expand Down
3 changes: 1 addition & 2 deletions examples/full-example/src/CallCenter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useState } from "react";
import { useSIPProvider } from "../../../src";
import { RegisterStatus, CONNECT_STATUS } from "../../../src/type";
import { RegisterStatus, CONNECT_STATUS, useSIPProvider } from "react-sipjs";

export const CallCenter = () => {
const {
Expand Down
18 changes: 14 additions & 4 deletions examples/full-example/src/CallSessionItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SessionState } from "sip.js";
import { useSessionCall } from "../../../src";
import { SessionDirection } from "../../../src/type";
import { useSessionCall, SessionDirection } from "react-sipjs";

import { CallTimer } from "./CallTimer";

export const CallSessionItem = (props: { sessionId: string }) => {
Expand Down Expand Up @@ -35,8 +35,18 @@ export const CallSessionItem = (props: { sessionId: string }) => {

{session.state === SessionState.Initial && (
<>
<button onClick={answer} className="text-[0.8rem] bg-transparent hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-[0.1rem] px-[0.3rem] border border-blue-500 hover:border-transparent rounded">Answer</button>
<button onClick={decline} className="text-[0.8rem] bg-transparent hover:bg-red-500 text-red-700 font-semibold hover:text-white py-[0.1rem] px-[0.3rem] border border-red-500 hover:border-transparent rounded">Decline</button>
<button
onClick={answer}
className="text-[0.8rem] bg-transparent hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-[0.1rem] px-[0.3rem] border border-blue-500 hover:border-transparent rounded"
>
Answer
</button>
<button
onClick={decline}
className="text-[0.8rem] bg-transparent hover:bg-red-500 text-red-700 font-semibold hover:text-white py-[0.1rem] px-[0.3rem] border border-red-500 hover:border-transparent rounded"
>
Decline
</button>
</>
)}

Expand Down
20 changes: 16 additions & 4 deletions examples/full-example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,13 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@tailwindcss/forms@^0.5.6":
version "0.5.6"
resolved "https://registry.yarnpkg.com/@tailwindcss/forms/-/forms-0.5.6.tgz#29c6c2b032b363e0c5110efed1499867f6d7e868"
integrity sha512-Fw+2BJ0tmAwK/w01tEFL5TiaJBX1NLT1/YbWgvm7ws3Qcn11kiXxzNTEQDMs5V3mQemhB56l3u0i9dwdzSQldA==
dependencies:
mini-svg-data-uri "^1.2.3"

"@types/babel__core@^7.20.2":
version "7.20.2"
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.2.tgz#215db4f4a35d710256579784a548907237728756"
Expand Down Expand Up @@ -1355,6 +1362,11 @@ micromatch@^4.0.4, micromatch@^4.0.5:
braces "^3.0.2"
picomatch "^2.3.1"

mini-svg-data-uri@^1.2.3:
version "1.4.4"
resolved "https://registry.yarnpkg.com/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz#8ab0aabcdf8c29ad5693ca595af19dd2ead09939"
integrity sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==

minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
Expand Down Expand Up @@ -1577,10 +1589,10 @@ react-refresh@^0.14.0:
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e"
integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==

react-sipjs-client@^0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/react-sipjs-client/-/react-sipjs-client-0.0.3.tgz#954490ec683657a9c49d11a0c050b11fea437972"
integrity sha512-97vOzf7tu9OygND7CP/8c+qpUMOcgUpsxgHfsIVshU5APJHeB7U3nT+o2G++6Ta7Dd29TLGFj69G/KBzuQ1asw==
react-sipjs@^0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/react-sipjs/-/react-sipjs-0.0.2.tgz#ddb5cdeff69ce463de96eb7b6f9a707fb573578d"
integrity sha512-1qkQBwYG24+KtLmoU5oqPyRVKNjw5Zc8QGdohK2Ut10xFry1q3ATCUixAcjJYynoXz2Ha0O5YadS1k+EAdyBeA==
dependencies:
sip.js "^0.21.2"

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "react-sipjs",
"version": "0.0.2",
"version": "0.0.3",
"description": "",
"main": "dist/index.umd.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
"dist",
"README.md"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand All @@ -15,7 +16,6 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@tailwindcss/forms": "^0.5.6",
"@types/react": "^18.2.23",
"react": "^18.2.0",
"typescript": "^5.2.2",
Expand Down
12 changes: 0 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,6 @@
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d"
integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==

"@tailwindcss/forms@^0.5.6":
version "0.5.6"
resolved "https://registry.yarnpkg.com/@tailwindcss/forms/-/forms-0.5.6.tgz#29c6c2b032b363e0c5110efed1499867f6d7e868"
integrity sha512-Fw+2BJ0tmAwK/w01tEFL5TiaJBX1NLT1/YbWgvm7ws3Qcn11kiXxzNTEQDMs5V3mQemhB56l3u0i9dwdzSQldA==
dependencies:
mini-svg-data-uri "^1.2.3"

"@types/prop-types@*":
version "15.7.8"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.8.tgz#805eae6e8f41bd19e88917d2ea200dc992f405d3"
Expand Down Expand Up @@ -188,11 +181,6 @@ loose-envify@^1.1.0:
dependencies:
js-tokens "^3.0.0 || ^4.0.0"

mini-svg-data-uri@^1.2.3:
version "1.4.4"
resolved "https://registry.yarnpkg.com/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz#8ab0aabcdf8c29ad5693ca595af19dd2ead09939"
integrity sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==

nanoid@^3.3.6:
version "3.3.6"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
Expand Down

0 comments on commit b79989c

Please sign in to comment.