Skip to content

Commit

Permalink
fix: remove unnecessary pinia option parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed May 17, 2024
1 parent d31ccf5 commit e2b9124
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/client-web-kit/src/core/http-client/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function installHTTPClient(app: App, options: HTTPClientInstallOptions =
const client = new Client({ baseURL: options.baseURL });

const storeCreator = injectStore(app);
const store = storeCreator(options.pinia);
const store = storeCreator();

const { refreshToken } = storeToRefs(store);

Expand Down
5 changes: 1 addition & 4 deletions packages/client-web-kit/src/core/http-client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
* view the LICENSE file that was distributed with this source code.
*/

import type { Pinia } from 'pinia';

export type HTTPClientInstallOptions = {
baseURL?: string,
pinia?: Pinia
baseURL?: string
};
2 changes: 1 addition & 1 deletion packages/client-web-kit/src/core/store/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function installStore(app: App, options: StoreInstallOptions = {}) {
STORE_ID,
() => createStore({ baseURL: options.baseURL }),
);
const store = storeCreator(options.pinia);
const store = storeCreator();

const cookies = useCookies();

Expand Down
2 changes: 0 additions & 2 deletions packages/client-web-kit/src/core/store/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import type {
Store as BaseStore,
StoreDefinition as BaseStoreDefinition,
Pinia,
_ExtractActionsFromSetupStore,
_ExtractGettersFromSetupStore, _ExtractStateFromSetupStore,
} from 'pinia';
Expand Down Expand Up @@ -47,7 +46,6 @@ export type StoreLoginContext = {

export type StoreInstallOptions = {
baseURL?: string,
pinia?: Pinia,
cookieSet?: CookieSetFn,
cookieUnset?: CookieUnsetFn,
cookieGet?: CookieGetFn
Expand Down

0 comments on commit e2b9124

Please sign in to comment.