Logout component. This component is responsible for logging out the user. It removes the user token from local storage, sets the user context to null, and then navigates back to the home page.
The rendered Logout component.
Logout component. This component is responsible for logging out the user. It removes the user token from local storage, sets the user context to null, and then navigates back to the home page.