You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
NextJS Infer type lead to props: never when encapsulating the page with next-firebase-auth
Version
^0.13.3-alpha.1
To Reproduce
importtype{InferGetServerSidePropsType}from'next'import{AuthAction,useAuthUser,withAuthUser,withAuthUserTokenSSR}from'next-firebase-auth'functionPage(props: InferGetServerSidePropsType<typeofgetServerSideProps>){constuser=useAuthUser()return(// v-- Property 'message' does not exist on type 'never'.ts(2339)<div>Message: {props.message}from{user.id}</div>)}exportdefaultwithAuthUser<InferGetServerSidePropsType<typeofgetServerSideProps>>({whenUnauthedBeforeInit: AuthAction.SHOW_LOADER,whenUnauthedAfterInit: AuthAction.REDIRECT_TO_LOGIN})(Page)exportconstgetServerSideProps=withAuthUserTokenSSR({whenUnauthed: AuthAction.REDIRECT_TO_LOGIN,})(async({ AuthUser })=>{console.log(AuthUser.id)return{props: {message: "Hello"}}})
Expected behavior
I would expect to have a proper typed props: { message: string }
Additional context
If you remove next-firebase-auth out of the equation, typing is correct
The text was updated successfully, but these errors were encountered:
Describe the bug
NextJS Infer type lead to
props: never
when encapsulating the page withnext-firebase-auth
Version
^0.13.3-alpha.1
To Reproduce
Expected behavior
I would expect to have a proper typed
props: { message: string }
Additional context
If you remove
next-firebase-auth
out of the equation, typing is correctThe text was updated successfully, but these errors were encountered: