Reactjs – Saved user info in React context, navbar shows logout after login. On navigating to other pages, it displays login instead of logout
This is the AuthProvider file that I am using to wrap my whole application // AuthContext.tsx import React, { createContext, useContext, useState, ReactNode } from "react"; interface UserData { username: string; password: string; id: string; first_name: string; last_name: string; postal:…