refactor(admin): split protect guards into dedicated export path
- remove `protectAdmin`/`isAdmin` re-exports from `features/admin/index.js` to avoid top-level `next/headers` import - add `./features/admin/protect` export entry in `package.json` - lazy-import `next/headers` in `router.js` `requireAuth` to defer resolution - update `features/admin/README.md` to document new import paths - translate `features/auth/index.js` comment to French for consistency
This commit is contained in:
@@ -72,6 +72,9 @@
|
||||
"./features/admin": {
|
||||
"import": "./dist/features/admin/index.js"
|
||||
},
|
||||
"./features/admin/protect": {
|
||||
"import": "./dist/features/admin/protect.js"
|
||||
},
|
||||
"./features/admin/server": {
|
||||
"import": "./dist/features/admin/AdminPage.server.js"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user