Fix login flows
This commit is contained in:
@@ -265,7 +265,14 @@
|
||||
}
|
||||
|
||||
function selectCity(cityName) {
|
||||
window.location.href = `/city/${cityName}`;
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const fromDashboard = urlParams.get('from') === 'dashboard';
|
||||
|
||||
if (user || fromDashboard) {
|
||||
window.location.href = `/city/${cityName}/dashboard`;
|
||||
} else {
|
||||
window.location.href = `/city/${cityName}`;
|
||||
}
|
||||
}
|
||||
|
||||
function showMessage(message, type = 'success') {
|
||||
|
||||
Reference in New Issue
Block a user