I am trying to get user email from firebase the when the user will login. That's why I can't define user before. I used optional chaining but react typescript giving error

I am trying to get user email from firebase the when the user will login. That's why I can't define user before. I used optional chaining but react typescript giving error
