@tracktor/shared-module 1.0.0-beta.0 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,4 @@
1
1
  # [Versions](https://github.com/Tracktor/shared-module/releases)
2
2
 
3
- ## v1.0.0-beta.0
4
- - **[feat]** : add date adapter
5
- - **[refactor]** : all dependencies are now peer dependencies
3
+ ## v1.0.0-beta.2
4
+ - **[fix]** : improve RequireAuth middleware
@@ -18,7 +18,9 @@ export interface RequireAuthProps {
18
18
  /**
19
19
  * Is user logged in
20
20
  */
21
- isLogged?: boolean;
21
+ isLogged?: () => {
22
+ isLogged: boolean;
23
+ } | boolean;
22
24
  /**
23
25
  * Fallback component for Suspense
24
26
  */
@@ -1,22 +1,5 @@
1
1
  import { PropsWithChildren } from "react";
2
- interface QueryClientConfigProviderProps<T> extends PropsWithChildren {
3
- /**
4
- * QueryClient instance
5
- */
6
- QueryClient: {
7
- new (config: {
8
- defaultOptions: {
9
- queries: {
10
- refetchOnWindowFocus: boolean;
11
- retry: number;
12
- getNextPageParam: (lastPage: [], allPages: [], lastPageParam: number) => number;
13
- };
14
- mutations: {
15
- [key: string]: any;
16
- };
17
- };
18
- }): T;
19
- };
2
+ interface QueryClientConfigProviderProps extends PropsWithChildren {
20
3
  /**
21
4
  * Default options for queries
22
5
  */
@@ -32,8 +15,7 @@ interface QueryClientConfigProviderProps<T> extends PropsWithChildren {
32
15
  * @param children
33
16
  * @param defaultQueriesOptions
34
17
  * @param defaultMutationsOptions
35
- * @param QueryClient
36
18
  * @constructor
37
19
  */
38
- declare const QueryClientConfigProvider: <T extends unknown>({ children, defaultQueriesOptions, defaultMutationsOptions, QueryClient, }: QueryClientConfigProviderProps<T>) => import("react/jsx-runtime").JSX.Element;
20
+ declare const QueryClientConfigProvider: ({ children, defaultQueriesOptions, defaultMutationsOptions }: QueryClientConfigProviderProps) => import("react/jsx-runtime").JSX.Element;
39
21
  export default QueryClientConfigProvider;