diff --git a/README.md b/README.md index 4efb2c2..c67b0c5 100644 --- a/README.md +++ b/README.md @@ -36,4 +36,5 @@ All tests in the package can be executed by running: `npm test`. 1.0.0 - Package initialization 1.0.1 - Added useTuitioClient default options -1.1.0 - In this version, the account logout method and the latest changes published by Tuitio were implemented. +1.1.0 - In this version, the account logout method and the latest changes published by Tuitio were implemented +1.1.1 - Account logout bug fix diff --git a/package-lock.json b/package-lock.json index bd00fa6..0164ed6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@flare/tuitio-client-react", - "version": "1.1.0", + "version": "1.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@flare/tuitio-client-react", - "version": "1.1.0", + "version": "1.1.1", "license": "MIT", "dependencies": { "@flare/tuitio-client": "^1.1.0" diff --git a/package.json b/package.json index 36db19d..d271df6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@flare/tuitio-client-react", - "version": "1.1.0", + "version": "1.1.1", "description": "Tuitio client react is an npm package written in typescript that facilitates the integration of a react application with Tuitio.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/src/reducer.ts b/src/reducer.ts index 173c168..b83f6d0 100644 --- a/src/reducer.ts +++ b/src/reducer.ts @@ -1,8 +1,9 @@ // Copyright (c) 2023 Tudor Stanciu +import { Dispatch } from "react"; +import { fetch } from "@flare/tuitio-client"; import { initialState } from "./initialState"; import type { TuitioReactState, TuitioDispatchActions } from "./types"; -import { Dispatch } from "react"; export const reducer = (state: TuitioReactState = initialState, action: any): TuitioReactState => { switch (action.type) { @@ -20,7 +21,7 @@ export const reducer = (state: TuitioReactState = initialState, action: any): Tu case "onLogoutSuccess": { const { configuration } = state; return { - ...initialState, + auth: { ...fetch() }, configuration }; }