27 lines
519 B
TypeScript
27 lines
519 B
TypeScript
import { NextPageContext } from "next"
|
|
import { getSession } from "next-auth/react"
|
|
|
|
export async function getServerSideProps(context: NextPageContext){
|
|
const session = await getSession(context);
|
|
if(!session){
|
|
return{
|
|
redirect: {
|
|
destination: '/auth',
|
|
permanent: false
|
|
}
|
|
}
|
|
}
|
|
return {
|
|
props: {}
|
|
}
|
|
}
|
|
|
|
|
|
function Profiles() {
|
|
return (
|
|
<div className="text-white text-4xl">Profili</div>
|
|
)
|
|
}
|
|
|
|
export default Profiles
|