@tracktor/shared-module 0.0.2 → 0.0.3
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 +2 -2
- package/README.md +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
15
|
```console
|
|
16
|
-
yarn add @tracktor
|
|
16
|
+
yarn add @tracktor/shared-module
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
21
|
```typescript jsx
|
|
22
|
-
import { RequireAuth } from "@tracktor
|
|
22
|
+
import { RequireAuth } from "@tracktor/shared-module";
|
|
23
23
|
```
|
|
24
24
|
Or you can import only the package do you
|
|
25
|
-
need with `@tracktor
|
|
25
|
+
need with `@tracktor/shared-module/{package}` like this:
|
|
26
26
|
|
|
27
27
|
```typescript jsx
|
|
28
|
-
import { RequireAuth } from "@tracktor
|
|
28
|
+
import { RequireAuth } from "@tracktor/shared-module/auth";
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## Inject dependencies with provider
|
|
@@ -34,8 +34,8 @@ On this exemple below, dependencies are injected with the
|
|
|
34
34
|
provider `InjectDependenciesProvider` for the component `RequireAuth`:
|
|
35
35
|
|
|
36
36
|
```typescript jsx
|
|
37
|
-
import { RequireAuth } from "@tracktor
|
|
38
|
-
import { InjectDependenciesProvider } from "@tracktor
|
|
37
|
+
import { RequireAuth } from "@tracktor/shared-module/auth"
|
|
38
|
+
import { InjectDependenciesProvider } from "@tracktor/shared-module/context";
|
|
39
39
|
import { Navigate, Outlet, Route, RouterProvider, useLocation } from "react-router-dom";
|
|
40
40
|
import { t } from "i18next";
|
|
41
41
|
|