This commit is contained in:
zadit frontend
2024-08-04 23:44:40 +00:00
parent 6461279b06
commit 7426ccd61b
8 changed files with 112 additions and 86 deletions

View File

@@ -26,8 +26,17 @@ export const useNavigationHelpers = (shopId, tableId) => {
navigate(url);
};
const goToScan = () => {
// Construct the base URL for the shop
let url = `/scan`;
// Construct the base URL
let url = "/scan";
// Append query parameters conditionally
const queryParams = new URLSearchParams();
if (shopId) queryParams.append("next", shopId);
// Set the URL with query parameters
if (queryParams.toString()) {
url += `?${queryParams.toString()}`;
}
// Perform the navigation
navigate(url);