@uniai-fe/next-providers 0.1.12 → 0.1.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniai-fe/next-providers",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Next.js State Providers for UNIAI FE Projects",
5
5
  "type": "module",
6
6
  "private": false,
package/src/NextRoots.tsx CHANGED
@@ -1,10 +1,7 @@
1
- import { Suspense } from "react";
2
-
3
1
  import StyledComponentsRegistry from "./lib/StyledComponentsRegistry";
4
2
  import AirtableProvider from "./provider/AirtableProvider";
5
3
  import { JotaiProvider } from "./provider/JotaiProvider";
6
4
  import { ReactQueryProvider } from "./provider/ReactQueryProvider";
7
- import RouterEventDetector from "./lib/RouterEventsDetector";
8
5
  import SetQueryCookie from "./lib/SetQueryCookie";
9
6
  import SystemThemeChecker from "./lib/SystemThemeChecker";
10
7
  import type { SystemLanguageType } from "@uniai-fe/next-devkit/types";
@@ -30,13 +27,13 @@ export default function NextRoots({
30
27
  locale = "ko",
31
28
  systemThemeOptions,
32
29
  modalProviders,
33
- onRouteChange,
30
+
34
31
  children,
35
32
  }: {
36
33
  locale?: SystemLanguageType;
37
34
  systemThemeOptions?: { exceptPaths: string[] };
38
35
  modalProviders?: React.ReactNode;
39
- onRouteChange?: () => void;
36
+
40
37
  children: React.ReactNode;
41
38
  }) {
42
39
  return (
@@ -49,9 +46,6 @@ export default function NextRoots({
49
46
  {modalProviders}
50
47
  </AirtableProvider>
51
48
  <SystemThemeChecker exceptPaths={systemThemeOptions?.exceptPaths} />
52
- <Suspense fallback={null}>
53
- <RouterEventDetector onRouteChange={onRouteChange} />
54
- </Suspense>
55
49
  </StyledComponentsRegistry>
56
50
  </JotaiProvider>
57
51
  </ReactQueryProvider>
@@ -1,28 +0,0 @@
1
- "use client";
2
-
3
- import { usePathname } from "next/navigation";
4
- import { useEffect } from "react";
5
-
6
- export interface RouterEventDetectorProps {
7
- onRouteChange?: () => void;
8
- }
9
-
10
- /**
11
- * 경로 변경 이벤트 감지 훅
12
- * @component
13
- * @param {RouterEventDetectorProps} props
14
- * @param {() => void} [props.onRouteChange] 경로 변경 시 실행할 콜백
15
- * @desc
16
- * - 최상위 layout에서 경로 변경을 감지하고, 전달된 콜백을 실행한다.
17
- */
18
- export default function RouterEventDetector({
19
- onRouteChange,
20
- }: RouterEventDetectorProps = {}) {
21
- const pathname = usePathname();
22
-
23
- useEffect(() => {
24
- onRouteChange?.();
25
- }, [onRouteChange, pathname]);
26
-
27
- return null;
28
- }