blob: 3957a8d27261fe6023ccf5e6226bec88ecebfe51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import getServerCredential from '@/common/libs/getServerCredential'
import { redirect } from 'next/navigation'
import React from 'react'
const Authenticated = ({ children }: { children: React.ReactNode }) => {
const credential = getServerCredential()
if (!credential) redirect('/login')
return children
}
export default Authenticated
|