Make the typing for the session work again by telling TypeScript the false value is actually null.
9 lines
229 B
TypeScript
9 lines
229 B
TypeScript
export const useAccountSession = () => useFetch(
|
|
"/api/auth/session",
|
|
{
|
|
transform: (input) => input === undefined ? false as any as null: input,
|
|
getCachedData(key, nuxtApp) {
|
|
return nuxtApp.payload.data[key];
|
|
},
|
|
}
|
|
);
|