Skip to content

Instantly share code, notes, and snippets.

View nenadfilipovic's full-sized avatar

Nenad Filipovic nenadfilipovic

View GitHub Profile
@nenadfilipovic
nenadfilipovic / Profile.tsx
Created June 26, 2021 16:41
Correctly infer prop types from getServerSideProps function
const Profile = ({
user,
}: InferGetServerSidePropsType<typeof getServerSideProps>): JSX.Element => {
return (
<section>
<div>{user.image}</div>
<div>{user.name}</div>
<div>{user.email}</div>
<div>{user.role}</div>
<div>{user.id}</div>