Skip to content

Commit

Permalink
fix: 스크립트 수정, 임포트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph0926 committed Oct 15, 2024
1 parent 92c61c6 commit 5384cf9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build": "rimraf dist && tsc",
"lint": "eslint",
"format": "prettier --w 'src/**/*.{ts,tsx,js,jsx,json,css,md}'",
"build:p": "pnpm run build && npm publish"
"pub": "pnpm run build && npm publish"
},
"repository": {
"type": "git",
Expand Down
10 changes: 5 additions & 5 deletions src/file-router.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Suspense, useMemo } from 'react';
import React from 'react';
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import { getRoutes } from './utils/get-routes';

Expand All @@ -14,13 +14,13 @@ export function FileRouter() {
/**
* 파일/폴더 정보를 읽은 후 해당 라우터 정보를 모두 가져옵니다
*/
const routes = useMemo(() => getRoutes(), []);
const routes = React.useMemo(() => getRoutes(), []);

const router = useMemo(() => createBrowserRouter(routes), [routes]);
const router = React.useMemo(() => createBrowserRouter(routes), [routes]);

return (
<Suspense fallback={<div>Loading,,,</div>}>
<React.Suspense fallback={<div>Loading,,,</div>}>
<RouterProvider router={router} />
</Suspense>
</React.Suspense>
);
}

0 comments on commit 5384cf9

Please sign in to comment.