Merge branch 'dev' of https://git.hanasys.jp/qcast3/onsitesurvey into feature/suitable
This commit is contained in:
commit
b2c22dc5a5
@ -22,5 +22,5 @@ export async function middleware(request: NextRequest) {
|
|||||||
// 2. /admin/* (exclude all routes under /admin)
|
// 2. /admin/* (exclude all routes under /admin)
|
||||||
// 3. /_next/* (exclude Next.js static and image assets)
|
// 3. /_next/* (exclude Next.js static and image assets)
|
||||||
export const config = {
|
export const config = {
|
||||||
matcher: ['/((?!dashboard|login|admin|api|_next/static|_next/image|favicon.ico).*)'],
|
matcher: ['/((?!login|assets).*)', '/((?!_next/static|_next/image|favicon.ico).*)'],
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,6 +74,12 @@ export default function EdgeProvider({ children, sessionData }: EdgeProviderProp
|
|||||||
router.push('/')
|
router.push('/')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pathname === '/') {
|
||||||
|
if (!session?.isLoggedIn) {
|
||||||
|
router.push('/login')
|
||||||
|
}
|
||||||
|
}
|
||||||
//alert 함수 변경해서 바인딩
|
//alert 함수 변경해서 바인딩
|
||||||
window.alert = function (msg, alertBtn = () => setAlert(false)) {
|
window.alert = function (msg, alertBtn = () => setAlert(false)) {
|
||||||
alertFunc(msg, alertBtn)
|
alertFunc(msg, alertBtn)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user