| 1 |
/** Get the current page URL: path name + query params. Optionally including hash. */ |
| 2 |
export const getCurrentUrl = ({ hash }: { hash?: boolean } = {}): string => { |
| 3 |
return window.location.pathname + window.location.search + (hash ? window.location.hash : ''); |
| 4 |
}; |