dangreco/home-assistant-nextjs-starter

saveTokens error at build

Opened this issue · 0 comments

I get the following error at build:

Type error: Type 'SetState' is not assignable to type 'SaveTokensFunc'.
Types of parameters 'partial' and 'data' are incompatible.
Type 'AuthData' is not assignable to type 'PartialState<AuthStore, keyof AuthStore, keyof AuthStore, keyof AuthStore, keyof AuthStore>'.
Type 'AuthData' is not assignable to type '(state: AuthStore) => AuthStore | Pick<AuthStore, keyof AuthStore>'.
Type 'AuthData' provides no match for the signature '(state: AuthStore): AuthStore | Pick<AuthStore, keyof AuthStore>'.
11 | return getAuth({
12 | hassUrl: preferExternal ? externalUrl || internalUrl : internalUrl,
13 | saveTokens: useAuthStore.setState,
| ^
14 | });
15 | };
16 |
error Command failed with exit code 1.

Unsure about what the functions does. It seems like the token is saved even if I comment it out.