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
Problem:
When we exit a screen after entering details without saving it, the system should ask "Do you want to exit, if you exit you will loose all the data entered" Yes or No?
wrapped the with Link so next can detect as route change <Link href={getLogoHref()}> <a className="navbar-brand" > <img src="/styles/CarPal-Logo-emma-transparent.png" width="100" height="106" alt="HillsCarPal" id="icon" /> </a> </Link >
for log out <button className="btn btn-success" id="logOutButton" onClick={()=>{if(window.confirm("Are you sure you want to logout?")){logout()}}} > Log Out </button>
The text was updated successfully, but these errors were encountered:
Problem:
When we exit a screen after entering details without saving it, the system should ask "Do you want to exit, if you exit you will loose all the data entered" Yes or No?
Proposed solution:
changes to this file
To detect route change/back button and other links :
Add componentwillmount and componentwillunmount and listen to router.events provided by next js router. handleroutechange to handle routing.
to make sure alert does not show up when upload is successful, created state variable
and set state when saving is successful and before router.push
To detect page reload:
`
To detect click on logo image and log out button:
changes in this file
wrapped the with Link so next can detect as route change
<Link href={getLogoHref()}> <a className="navbar-brand" > <img src="/styles/CarPal-Logo-emma-transparent.png" width="100" height="106" alt="HillsCarPal" id="icon" /> </a> </Link >
for log out
<button className="btn btn-success" id="logOutButton" onClick={()=>{if(window.confirm("Are you sure you want to logout?")){logout()}}} > Log Out </button>
The text was updated successfully, but these errors were encountered: